Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/83#discussion_r15518230
  
    --- Diff: 
locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsUtil.java ---
    @@ -387,7 +387,18 @@ public static String 
getFirstReachableAddress(ComputeServiceContext context, Nod
             //     jclouds.ssh.max-retries
             //     jclouds.ssh.retry-auth
     
    -        final SshClient client = context.utils().sshForNode().apply(node);
    +        SshClient client;
    +        try {
    +            client = context.utils().sshForNode().apply(node);
    +        } catch (Exception e) {
    +            /* i've seen: java.lang.IllegalStateException: Optional.get() 
cannot be called on an absent value
    +             * from 
org.jclouds.crypto.ASN1Codec.createASN1Sequence(ASN1Codec.java:86), if the ssh 
key has a passphrase, against AWS.
    +             * 
    +             * others have reported: java.lang.IllegalArgumentException: 
DER length more than 4 bytes
    +             * when using a key with a passphrase (perhaps from other 
clouds?); not sure if that's this callpath or a different one.
    +             */
    +            throw new IllegalStateException("Unable to connect SshClient 
to "+node+"; check that the node is accessible and that the SSH key exists and 
is correctly configured, including any passphrase defined", e);
    --- End diff --
    
    This could swallow interrupts etc? How about doing 
`Exceptions.propagateIfFatal()` first?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to