1 Reply Latest reply on Jul 4, 2012 3:49 PM by iocanel

    Fabric Amazon EC2 Integration

    wbailey

      I'm trying to follow the Fabric guide  here  for creating a fabric cluster in the amazon cloud.

       

      I've got to the container-create-cloud step. This command creates the amazon EC2 instances for me but fails to connect to it via SSH, I get the following message in the console:

       

      FuseESB:karaf@root> fabric:container-create-cloud --provider aws-ec2 container1
      Looking up for compute service.
      Creating 1 nodes in the cloud. Using operating system: ubuntu. It may take a while ...
      Node fabric-901308e9 has been created.
      Configuring firewall.
      Installing fabric agent on container container2. It may take a while...
                        [id] [container]                    [public addresses]             [status]
        us-east-1/i-901308e9 container2                     [23.22.216.13]                 Failed to connect to the container via ssh.
      

       

      I've watched the video on the above link and I've done exactly the same thing but it doesn't connect. I know this is related to the SSH keys as I get the following in the log file. What I don't understand is how I set it up with the correct key, as the instance key pair is created during the first part of the above command?

       

      09:42:46,863 | WARN  | l Console Thread | DefaultConfig                    | 173 - net.schmizz.sshj - 0.7.0 | Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy
      09:42:46,867 | INFO  | l Console Thread | TransportImpl                    | 173 - net.schmizz.sshj - 0.7.0 | Client identity string: SSH-2.0-SSHJ_0_7
      09:42:46,880 | INFO  | l Console Thread | TransportImpl                    | 173 - net.schmizz.sshj - 0.7.0 | Server identity string: SSH-2.0-OpenSSH_5.1p1 Debian-6ubuntu2
      09:42:46,880 | INFO  | l Console Thread | KeyExchanger                     | 173 - net.schmizz.sshj - 0.7.0 | Sending SSH_MSG_KEXINIT
      09:42:46,881 | INFO  | reader           | KeyExchanger                     | 173 - net.schmizz.sshj - 0.7.0 | Received SSH_MSG_KEXINIT
      09:42:46,982 | INFO  | reader           | DHG14                            | 173 - net.schmizz.sshj - 0.7.0 | Sending SSH_MSG_KEXDH_INIT
      09:42:47,002 | INFO  | reader           | KeyExchanger                     | 173 - net.schmizz.sshj - 0.7.0 | Received kex followup data
      09:42:47,002 | INFO  | reader           | DHG14                            | 173 - net.schmizz.sshj - 0.7.0 | Received SSH_MSG_KEXDH_REPLY
      09:42:47,104 | INFO  | reader           | KeyExchanger                     | 173 - net.schmizz.sshj - 0.7.0 | Sending SSH_MSG_NEWKEYS
      09:42:47,104 | INFO  | reader           | KeyExchanger                     | 173 - net.schmizz.sshj - 0.7.0 | Received SSH_MSG_NEWKEYS
      09:42:47,105 | INFO  | l Console Thread | SSHClient                        | 173 - net.schmizz.sshj - 0.7.0 | Key exchange took 0.225 seconds
      09:42:47,139 | INFO  | l Console Thread | TransportImpl                    | 173 - net.schmizz.sshj - 0.7.0 | Setting active service to ssh-userauth
      09:42:47,139 | INFO  | l Console Thread | UserAuthImpl                     | 173 - net.schmizz.sshj - 0.7.0 | Trying `publickey` auth...
      09:42:47,146 | ERROR | l Console Thread | Promise                          | 173 - net.schmizz.sshj - 0.7.0 | <<authenticated>> woke to: net.schmizz.sshj.userauth.UserAuthException: publickey auth failed
      09:42:47,146 | INFO  | l Console Thread | UserAuthImpl                     | 173 - net.schmizz.sshj - 0.7.0 | `publickey` auth failed
      09:42:47,146 | INFO  | l Console Thread | ssh                              | 194 - jclouds-log4j - 1.3.2 | << (ubuntu:rsa[fingerprint(b4:95:2b:68:c4:0a:0f:d5:46:8a:b9:56:9a:20:e1:fa),sha1(58:96:42:57:c0:57:e7:e6:2e:66:03:27:84:f2:b1:b5:5f:af:f7:b5)]@184.72.85.138:22) error acquiring SSHClient(timeout=60000) (attempt 5 of 40): Exhausted available authentication method
      

       

        • 1. Re: Fabric Amazon EC2 Integration
          iocanel

          Hi Warren,

           

          Yes, the key pair is created during the first part of the command. The default behavior is to use the your personal public key, so that you can directly ssh to your containers without the need of password.

           

          I've seen some cases for some images, that they take a while before the public key authentication is setup. But we have set a really high number of retries, so I don't think that this is the case.

           

          Are you able to ssh to the container from your shell, putty or whatever you use for ssh?

          Can you try to create a new private key and specify that using the --private-key-option?

           

          Finally, some more info on your OS and the full log might be helpful.