docker-machine create -d generic hangs on Importing SSH key...
docker-machine create -d generic --generic-ip-address XX.XX.XX.XX --generic-ssh-key "/Users/sumerman/.ssh/XXXX" the_name
Importing SSH key...
nothing else happens
Could you paste the output using docker-machine -D create? Thanks.
it prints help message then :open_mouth:
I had a similar case of this behaviour today and it turned out the cause of the hang was that the target machine's firewall did not have the proper port (2376) open. The create process appears to continuously retry connecting on this port, waiting for the daemon to start (visible on the console with -D flag).
@sumerman I mean the same command as before, but with -D arg to docker-machine included.
@nathanleclaire I got that, and that's what I did. S
I had a similar hang when trying to use docker-machine's generic driver to provision docker on a Linode host running Ubuntu 14.04. When I install docker manually on that host, I get warned that the aufs driver will not work, and docker magically falls back to the devicemapper driver instead. When docker-machine provisions the box, it provides specific configuration data in /etc/default/docker to use the aufs storage driver. When the docker daemon starts, it is unable to use aufs and restarts in a fast loop until upstart kills it for good. The solution for me was to use --engine-storage-driver devicemapper from docker-machine. So my command looks like this (with debug enabled):
docker-machine -D create --engine-storage-driver devicemapper -d generic --generic-ip-address 45.79.179.123 linode2
(Prior to running this, I also had to run ssh-copy-id [email protected] to get passwordless ssh into the Linode host).
Perhaps docker-machine by default shouldn't set the storage-driver and instead allow the docker daemon to use its own defaults.
@rbrewer We default to AUFS since it is the most stable storage driver but I had forgotten some providers such as Linode use incompatible kernels. I'll keep it in mind for the future.
I had another similar issue.
I was trying to create a docker-machine inside an existing instance at my DO account with generic options. Everything was configured correctly but at some point the docker-machine tells that the remote daemon is not responding....
Here some debug info:
"Sucessfull stuff was left out of this [...]"
Using SSH client type: external
About to run SSH command:
sudo service docker start
&{/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 /root/.docker/machine/machines/dm2/id_rsa -p 22 [email protected] sudo service docker start] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: docker start/running, process 5332
Daemon not responding yet: dial tcp xxx.xxx.xx.xxx:port: connection timed out
Daemon not responding yet: dial tcp xxx.xxx.xx.xxx:port: connection timed out
Notice that the SSH yells some error but I couldn't find you what is happening... =/
EDIT:
docker-machine version 0.4.0 (9d0dc7a)
I found that the function that hangs here
func (d *Driver) GetState() (state.State, error) {
addr := fmt.Sprintf("%s:%d", d.IPAddress, d.SSHPort)
_, err := net.DialTimeout("tcp", addr, defaultTimeout)
var st state.State
if err != nil {
st = state.Stopped
} else {
st = state.Running
}
return st, nil
}
@nathanleclaire, maybe @sumerman was encountering the same problem...
All, please try again and file a new issue if it still persists with 0.5.0. Thanks!