Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kitchen attempts to log in before sshd is ready #85

Closed
scarolan opened this issue Dec 27, 2014 · 5 comments
Closed

Kitchen attempts to log in before sshd is ready #85

scarolan opened this issue Dec 27, 2014 · 5 comments

Comments

@scarolan
Copy link
Contributor

This is on the plain vanilla CentOS 6.5 AMI from the marketplace. Kitchen fails to log in the first time i run 'kitchen converge', then the second time I run it succeeds. I think it should wait maybe 5-10 seconds after port 22 is open to allow the machine to become fully ready.

-----> Creating <frontend-2-centos-65>...
       Creating <>...
       If you are not using an account that qualifies under the AWS
       free-tier, you may be charged to run these suites. The charge
       should be minimal, but neither Test Kitchen nor its maintainers
       are responsible for your incurred costs.
       EC2 instance <i-99d44395> created.
.........       (server ready)
       Waiting for 54.149.191.16:22...
       Waiting for 54.149.191.16:22...
       (ssh ready)

       Finished creating <frontend-2-centos-65> (3m17.39s).
-----> Converging <frontend-2-centos-65>...
       Preparing files for transfer
       Resolving cookbook dependencies with Berkshelf 3.2.1...
       Removing non-cookbook files before transfer
>>>>>> Converge failed on instance <frontend-2-centos-65>.
>>>>>> Please see .kitchen/logs/frontend-2-centos-65.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Authentication failed for user root@54.149.191.16
>>>>>> ----------------------
@gmiranda23
Copy link

Confirmed. I got around this by setting
ssh_timeout: 5
ssh_retries: 5

Perhaps this should be a setting managed in amis.json?

@tyler-ball
Copy link
Contributor

I'm going to try and repro this so I can see where in the code it is failing - it may make sense to hardcode retry logic in there, or default the ssh_timeout and ssh_restries config to be greater for ec2 instances.

EDIT
NM, I can see the list of AMIs here - https://github.com/test-kitchen/kitchen-ec2/blob/master/data/amis.json

@tyler-ball
Copy link
Contributor

Hey @scarolan - can you try this again with the latest version of kitchen-ec2 (0.9.0) and see if this is still an issue? We updated to use the Test Kitchen 1.4 logic which greatly improved transport issues.

@tyler-ball
Copy link
Contributor

I'm going to go ahead and close this since I haven't gotten a response - please re-open if you're still having problems with the latest version of kitchen-ec2!

@gmiranda23
Copy link

Could not verify due to #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants