-
Notifications
You must be signed in to change notification settings - Fork 331
Knife-ec2 prematurely fails before SSH is even available. #671
Copy link
Copy link
Open
Labels
Status: UntriagedAn issue that has yet to be triaged.An issue that has yet to be triaged.Type: BugDoes not work as expected.Does not work as expected.
Description
For some reason, When I try bootstrapping a new server, It creates the VM but right away when it gets to the 'Waiting for sshd access to become available' line, it instantly fails within a second or two with "ERROR: Net::SSH::Disconnect: disconnected: Too many authentication failures (2)" even though SSH has not started yet on the server [usually takes a minute or two]. It just seems it tried connecting and failing too FAST even before the new VM wasn't loaded up yet.
Example command.
knife ec2 server create 10.4.2.46 -N mytestserver.server.com --image ami-12345 -f t3.medium --region ca-central-1 --ssh-key mykey --subnet subnet-d123455 -g sg-1234567 -E production -r 'role[tester]' --ebs-optimized --cpu-credits standard --ebs-size 20 -A --server-connect-attribute private_ip_address --private-ip-address 10.4.2.46 --aws-profile myawsprofile --sudo --node-ssl-verify-mode none --ssh-verify-host-key never -U root --ssh-gateway root@mygatewayloaderip.server.com
Output
Waiting for EC2 to create the instance
Instance ID: i-0b12345678
Flavor: t3.medium
Image: ami-12345
Region: ca-central-1
Availability Zone: ca-central-1a
Security Group Ids: sg-1234567
AWS Tags: Name: mytestserver.server.com
SSH Key: mykey
T2/T3 Unlimited: Disabled
Subnet ID: subnet-d123455
Tenancy: default
Private IP Address: 10.4.2.46
Waiting for sshd access to become available
SSH Target Address: 10.4.2.46(private_ip_address)
ERROR: Net::SSH::Disconnect: disconnected: Too many authentication failures (2)
Versions
chef-client 17.6.18
Using latest Knife gem [knife (17.5.22)
knife-ec2 (2.1.4)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: UntriagedAn issue that has yet to be triaged.An issue that has yet to be triaged.Type: BugDoes not work as expected.Does not work as expected.