I'm having trouble connecting to an instance once it's been created. I confirmed that the instances are being created via the AWS console and SSH. But as you can see from the trace below, I can't connect. (I'm following http://ift.tt/M4oZdY)
Error Trace:
➜ blog git:(master) ✗ ALIAS=app01 ROLES=app cap rubber:create
triggering load callbacks
* 2015-04-16 13:40:00 executing `rubber:init' ...
* 2015-04-16 13:40:00 executing `rubber:create'
* Security Group already in cloud, syncing rules: web
* Security Group already in cloud, syncing rules: default
* Security Group already in cloud, syncing rules: web_tools
** Creating instance ami-2da78f1d/c1.medium/default/us-west-2
** Instance app01 created: i-7c9e128a
Waiting for instances to start...........
** Instance running, fetching hostname/ip data
Trying to enable root login
* 2015-04-16 14:23:15 executing `rubber:_ensure_key_file_present'
* 2015-04-16 14:23:15 executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'mkdir -p /root/.ssh && cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["52.11.245.76"]
. ** Failed to connect to 52.11.245.76, retrying
* 2015-04-16 14:23:17 executing `rubber:_ensure_key_file_present'
* 2015-04-16 14:23:17 executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'mkdir -p /root/.ssh && cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["52.11.245.76"]
. ** Failed to connect to 52.11.245.76, retrying
* 2015-04-16 14:23:19 executing `rubber:_ensure_key_file_present'
* 2015-04-16 14:23:19 executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'mkdir -p /root/.ssh && cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["52.11.245.76"]
. ** Failed to connect to 52.11.245.76, retrying
rubber.yml
app_name: blog
admin_email: "root@#{full_host}"
timezone: US/Eastern
domain: foo.com
cloud_providers:
aws:
region: us-west-2
access_key: MYKEY-OMITTED
secret_access_key: MYSECRET-OMITTED
account: 'MYACCOUNT-OMITTED'
key_name: gsg-keypair
key_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ec2/*' + cloud_providers.aws.key_name].first}"
image_type: m1.small
image_id: ami-2da78f1d
connecting with ssh without problems:
➜ blog git:(master) ✗ ssh -i ~/.ec2/gsg-keypair ubuntu@ec2-52-11-245-76.us- west-2.compute.amazonaws.com
Welcome to Ubuntu Vivid Vervet (development branch) (GNU/Linux 3.19.0-12-generic x86_64)
connecting with cap rubber:bootstrap command:
➜ blog git:(master) ✗ cap rubber:bootstrap
' triggering load callbacks
* 2015-04-16 14:57:33 executing `rubber:init'
** Auto role: app => app01.foo.com, {:platform=>"linux", :provider=>"aws"}
triggering before callbacks for `rubber:bootstrap'
* 2015-04-16 14:57:33 executing `rubber:base:update_sudoers'
servers: ["app01.foo.com"]
connection failed for: app01.foo.com (ArgumentError: invalid option(s): number_of_password_prompts)
Things I've tried:
- Changing the name of the pem file itself and making sure the names are the same everywhere. With .pem, without .pem.
- Generating SSH key locally and importing it
- connecting via SSH (to see if I can connect without rubber)
- clearing my SSH keys “ssh-add -D” http://ift.tt/1IiXQAb
I've read many people say that their solution to this problem was a typo in the key_name, but I checked and tried different names many times.
Aucun commentaire:
Enregistrer un commentaire