This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
docker-machine env xxx hangs forever #1500
Copy link
Copy link
Closed
Labels
Description
The machine is running, and I could use docker-machine ssh xxx login that machine.
But docker-machine env xxx hangs forever. The debugging output said the "host is down". But
docker-machine ls gave me
"NAME ACTIVE DRIVER STATE URL SWARM
dev-test virtualbox Running tcp://192.168.99.100:2376 "
possible related issue: #1168
docker-machine version: v0.3.0
The full info:
Cmd: docker-machine -D env dev-test
Output:
shell: sh
executing: /usr/bin/VBoxManage showvminfo dev-test --machinereadable
STDOUT: name="dev-test"
groups="/"
ostype="Linux 2.6 / 3.x (64 bit)"
UUID="3928af02-deb5-4620-9433-0028c017030b"
CfgFile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.vbox"
SnapFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Snapshots"
LogFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Logs"
hardwareuuid="3928af02-deb5-4620-9433-0028c017030b"
memory=1024
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
chipset="piix3"
firmware="BIOS"
cpus=1
pae="on"
longmode="on"
synthcpu="off"
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
VMState="running"
VMStateChangeTime="2015-07-10T07:54:44.216000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/var/root/.docker/machine/machines/dev-test/boot2docker.iso"
"SATA-ImageUUID-0-0"="9ee6b7c5-49b9-4ec9-bc9e-6034d222da02"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/var/root/.docker/machine/machines/dev-test/disk.vmdk"
"SATA-ImageUUID-1-0"="83cdb0e3-f525-44ee-9c1c-40dab5361d33"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="080027CA87FE"
cableconnected1="on"
nic1="nat"
nictype1="82540EM"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,50762,,22"
hostonlyadapter2="vboxnet1"
macaddress2="0800276E6AB8"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
lpt1="off"
lpt2="off"
audio="none"
clipboard="disabled"
draganddrop="disabled"
SessionType="headless"
VideoMode="720,400,0"@0,0
vrde="off"
usb="off"
ehci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
VRDEActiveConnection="off"
VRDEClients=0
vcpenabled="off"
vcpscreens=0
vcpfile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.webm"
vcpwidth=1024
vcpheight=768
vcprate=512
vcpfps=25
GuestMemoryBalloon=0
GuestOSType="Linux26_64"
GuestAdditionsRunLevel=1
GuestAdditionsVersion="4.3.28 r100309"
GuestAdditionsFacility_VirtualBox Base Driver=50,1436514900104
GuestAdditionsFacility_Seamless Mode=0,1436514900104
GuestAdditionsFacility_Graphics Mode=0,1436514900104
STDERR:
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
&{/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 /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker@localhost ip addr show dev eth1] [] <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link
valid_lft forever preferred_lft forever
SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link
valid_lft forever preferred_lft forever
END SSH
invalid certs detected; regenerating for 192.168.99.100:2376
command=configureAuth machine=dev-test
Using SSH client type: external
About to run SSH command:
cat /etc/os-release
&{/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 /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker@localhost cat /etc/os-release] [] <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: NAME=Boot2Docker
VERSION=1.7.0
ID=boot2docker
ID_LIKE=tcl
VERSION_ID=1.7.0
PRETTY_NAME="Boot2Docker 1.7.0 (TCL 6.3); master : 7960f90 - Thu Jun 18 18:31:45 UTC 2015"
ANSI_COLOR="1;34"
HOME_URL="http://boot2docker.io"
SUPPORT_URL="https://github.com/boot2docker/boot2docker"
BUG_REPORT_URL="https://github.com/boot2docker/boot2docker/issues"
found compatible host: boot2docker
Using SSH client type: external
About to run SSH command:
sudo hostname dev-test && echo "dev-test" | sudo tee /var/lib/boot2docker/etc/hostname
&{/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 /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker@localhost sudo hostname dev-test && echo "dev-test" | sudo tee /var/lib/boot2docker/etc/hostname] [] <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: dev-test
executing: /usr/bin/VBoxManage showvminfo dev-test --machinereadable
STDOUT: name="dev-test"
groups="/"
ostype="Linux 2.6 / 3.x (64 bit)"
UUID="3928af02-deb5-4620-9433-0028c017030b"
CfgFile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.vbox"
SnapFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Snapshots"
LogFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Logs"
hardwareuuid="3928af02-deb5-4620-9433-0028c017030b"
memory=1024
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
chipset="piix3"
firmware="BIOS"
cpus=1
pae="on"
longmode="on"
synthcpu="off"
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
VMState="running"
VMStateChangeTime="2015-07-10T07:54:44.216000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/var/root/.docker/machine/machines/dev-test/boot2docker.iso"
"SATA-ImageUUID-0-0"="9ee6b7c5-49b9-4ec9-bc9e-6034d222da02"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/var/root/.docker/machine/machines/dev-test/disk.vmdk"
"SATA-ImageUUID-1-0"="83cdb0e3-f525-44ee-9c1c-40dab5361d33"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="080027CA87FE"
cableconnected1="on"
nic1="nat"
nictype1="82540EM"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,50762,,22"
hostonlyadapter2="vboxnet1"
macaddress2="0800276E6AB8"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
lpt1="off"
lpt2="off"
audio="none"
clipboard="disabled"
draganddrop="disabled"
SessionType="headless"
VideoMode="720,400,0"@0,0
vrde="off"
usb="off"
ehci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
VRDEActiveConnection="off"
VRDEClients=0
vcpenabled="off"
vcpscreens=0
vcpfile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.webm"
vcpwidth=1024
vcpheight=768
vcprate=512
vcpfps=25
GuestMemoryBalloon=0
GuestOSType="Linux26_64"
GuestAdditionsRunLevel=1
GuestAdditionsVersion="4.3.28 r100309"
GuestAdditionsFacility_VirtualBox Base Driver=50,1436514900104
GuestAdditionsFacility_Seamless Mode=0,1436514900104
GuestAdditionsFacility_Graphics Mode=0,1436514900104
STDERR:
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
&{/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 /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker@localhost ip addr show dev eth1] [] <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link
valid_lft forever preferred_lft forever
SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link
valid_lft forever preferred_lft forever
END SSH
Daemon not responding yet: dial tcp 192.168.99.100:2376: host is down
Daemon not responding yet: dial tcp 192.168.99.100:2376: host is down
Daemon not responding yet: dial tcp 192.168.99.100:2376: host is down
Reactions are currently unavailable
Activity
pedroxs commentedon Jul 10, 2015
I have similar issue with windows 7 OS. here is a gist of the log file.
CpuID commentedon Jul 11, 2015
I am noticing "docker-machine env machinename" hang a lot also, especially when it is in my ~/.profile, causes new terminals to hang and not start 50% of the time approx. Currently just ctrl+c'ing the new tab shell, and spawning another one 2 seconds later tends to do the job.
Difficult to reproduce in a new/active terminal, tends to be far more often when spawning a new one.
OSX 10.10.4, Docker Machine 0.3.0. These issues were not present in 0.2.x.
a0s commentedon Jul 13, 2015
I have same issue with strange exit status 255
chantra commentedon Jul 14, 2015
I am able to reproduce this issue on MacOSX for the virtualbox driver. The issue typically happens when the route to the private network is missing (the one used by docker cli).
In my case, one of the reason I suspect this route is missing is because I am using a VPN that tends to mess up with priv network routes. A fix to this is to run something along:
Where
192.168.99.0/24is the network range used by boot2docker andvboxnet6the interface assigned to boot2docker private network.inkel commentedon Jul 15, 2015
I've tried @chantra's solution but didn't do the trick,
docker-machinestill hangs when in a new shell with any subcommand. Interrupting with^Cand trying again works, though.nathanleclaire commentedon Jul 15, 2015
Hi all, anyone who is encountering this issue, one of the possible issues at play is that the Docker daemon is not running.
Can you please try / paste the output of the following commands (this is for VMs running boot2docker):
Thanks!
inkel commentedon Jul 15, 2015
@nathanleclaire when I try to run that command, it hangs here:
Once if finishes (if it ever does) I'll paste what's next.
nathanleclaire commentedon Jul 15, 2015
@inkel Hm, it should run pretty much right away if it's going to succeed, so if it takes more than a few seconds something's wrong.
inkel commentedon Jul 15, 2015
It just finished with:
It took definitively more than a few seconds. I'm running again with
timeto see how much.inkel commentedon Jul 15, 2015
nathanleclaire commentedon Jul 15, 2015
If you run :
$ /usr/bin/ssh -vvv -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/inkel/.docker/machine/machines/dev/id_rsa -p 54973 docker@localhost sudo /etc/init.d/docker restartfrom the CLI on its own, what do you get?
inkel commentedon Jul 15, 2015
inkel commentedon Jul 15, 2015
I think I've made a mistake with my previous comment, this is the right output:
inkel commentedon Jul 15, 2015
Mmm... after a few minutes, the following appeared on my screen:
nathanleclaire commentedon Jul 15, 2015
@inkel Odd. Do you have a VPN or any unusual setup as far as your network goes that you can think of?
22 remaining items
dracan commentedon Oct 9, 2015
I get this issue after my host machine has gone to sleep, and I come back to it later. I end up deleting everything from my c:\users\dan.docker\machine folder (other than the cache), then recreate it all again. It's quicker doing that than rebooting the host machine! ;)
dracan commentedon Oct 9, 2015
Oh, and I also have to kill some processes before doing that. I tend to have 3 'VBoxHeadless.exe' processes, 3 'VBoxNetDHCP.exe', and a 'VirtualBox Interface'.
mrumpf commentedon Oct 14, 2015
I woke up my notebook and deleted a docker-machine instance with name "dev".
I ran the following commands to create two new virtual machines:
The
docker-machine env dev --shell=bashhangs for some minutes and dumps the following to stderr:The stdout log output can be found in this Gist.
The strange thing is that the correct output is dumped after the maximum number of retries is reached, see the end of the log.
This is the timed stdout output:
And it keeps getting stranger...
The same command for the first virtual machine is executed without any issue:
nathanleclaire commentedon Oct 14, 2015
@mrumpf If you add a trailing slash to the *PROXY options e.g.
--engine-env HTTP_PROXY=http://10.206.246.20:8080/, does it succeed or continue failing?remram44 commentedon Oct 15, 2015
I'm getting this right now on Debian 8.2.
jrep commentedon Oct 29, 2015
Add Jupiter Junos Pulse to the list of VPN software that seems to cause this problem.
It strikes me as likely that any VPN would do this, since they all have the same fundamental definition to override "ordinary" routing.
Update: by using a "split connection" (an option that my installation allows. by connecting to a different VPN server), I seem to avoid this.
remram44 commentedon Oct 29, 2015
Wait what? I'm not using any kind of VPN or proxy...
jrep commentedon Oct 29, 2015
VPN is just one of many things that mess with network configuration. More generally, any change in network connections might (and that includes some things you might not think of as "networking"):
The VPN case is noteworthy because it may offer the "split" option, which may avoid flummoxing the Docker connection from this cause. But split VPN isn't going to prevent all those other things from messing things up.
remram44 commentedon Oct 29, 2015
I'm using an old-fashioned RJ45 cable...
I don't understand why docker-machine is that sensitive to these events.
dgageot commentedon Oct 29, 2015
I tried rj45 plug/unplug, wifi switching. No issue on my side.
jrep commentedon Nov 3, 2015
Could there be a need for some processing time? I keep running into this with a shell function that does:
When I do these commands one at a time, with my fingers, it goes fine. But when run from the script, the same command sequence works once, than hangs (or takes several minutes).
Connecting to @mrumpf , this VM is the second in my
docker-machine lslist.nathanleclaire commentedon Nov 3, 2015
@jrep Ah, in that case, yes, you definitely need to wait a brief interval for the daemon to start up and begin accepting requests. It's why Machine has code to wait for Docker in between our daemon restarts during provisioning. Arguably, we should check for that on
startas well.nathanleclaire commentedon Nov 5, 2015
This issue is very long and contains a lot of digressions. If someone continues to encounter similar ones please open a new one at https://github.com/docker/machine/issues/new with detailed information including:
--debugflag~/.docker/machine/machines/name/name.Thanks!