Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I ran into this problem also. After a couple of EC2 instance deploys I ended up getting stuck (it literally worked 1 night, and then got stuck the next morning).</p> <p>My quick fix was to log into Amazon EC2, delete the keypair associated to my deployment.. IE:</p> <pre><code>EC2 = Fog::Compute.new provider: 'AWS', region: REGION, aws_access_key_id: AWS_ACCESS_KEY, aws_secret_access_key: AWS_SECRET_KEY Fog.credential = waffles s = EC2.servers.bootstrap image_id: AMI_ID, flavor_id: FLAVOR_ID, private_key_path: '~/.ssh/id_rsa', public_key_path: '~/.ssh/id_rsa.pub', tags: { Name: TAGGED_NAME }, username: ROOT_USER </code></pre> <p>This will create a key pair called "fog_waffles b6:21:d1:3d:2b:b9:e7:48:b9:75:50:3f:03:5b:fb:85". Delete it and you should be able to move forward.</p> <p>From what I can tell <strong>the keypair doesn't get updated/replaced if you create a new instance with the same keypair name</strong>. If you delete that instance, and then create a new instance using a <strong>new keypair with the same name</strong> it seems to run into problems.</p> <p>More on <a href="http://docs.aws.amazon.com/AWSSecurityCredentials/1.0/AboutAWSCredentials.html#EC2KeyPairs" rel="nofollow">EC2 keypairs</a></p> <p><strong>Addendum</strong></p> <p>The version of fog I'm using is 1.9.</p> <p>If you have multiple people creating instances, you might want to go with something like this:</p> <pre><code>EC2 = Fog::Compute.new provider: 'AWS', region: REGION, aws_access_key_id: AWS_ACCESS_KEY, aws_secret_access_key: AWS_SECRET_KEY Fog.credential = waffles s = EC2.servers.bootstrap image_id: AMI_ID, flavor_id: FLAVOR_ID, private_key_path: '~/.ssh/id_rsa', public_key_path: '~/.ssh/id_rsa.pub', tags: { Name: TAGGED_NAME }, username: ROOT_USER EC2.delete_key_pair("fog_waffles") </code></pre> <p>This will make sure that the key pair never runs into a conflict. It's OK to delete it since it's only needed for the deployment of the instance. Fog drops your public key into authorized_keys once the instance is deployed, which allows you to access the instance.</p> <p>Another option would be to change Fog.credential to be unique for each user (instead of deleting it). IE:</p> <pre><code>Fog.credential = waffles_ryan </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload