docker-machine create -d generic
stays stuck forever when credentials are missing #1890
Description
openedon Sep 22, 2015
What I do:
docker-machine create --driver generic --generic-ip-address node1 node1
What I expect:
Machine magic happens! Or, I get an error message telling me that I'm stupid because I forgot ________________ (fill in the blank).
What I see instead:
Importing SSH key...
And ~10 minutes later nothing has happened.
What I see if I add --debug
:
Importing SSH key...
IP: node1
Getting to WaitForSSH function...
Testing TCP connection to: node1:22
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /home/docker/.docker/machine/machines/node1/id_rsa -p 22 root@node1 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : exit status 255
The whole message (without the initial Importing SSH key...
) is then repeated forever, every few seconds.
What I see if I try to SSH:
docker@node1 ~: ssh root@node1
root@node1's password:
Ah-a! I knew I was stupid. In fact I need to connect as a different user (which is a sudoer, and Machine is awesome so it seems to use sudo to acquire privileges correctly, and I end up being an happy camper!)
I'm using:
docker@node1 ~: docker-machine -v
docker-machine version 0.4.1 (e2c88d6)
I think Machine should either detect that the credentials are wrong, or just try a few times and then give up. (At first I thought it was just slow downloading everything...)