OS X 10.10.4
docker-machine version 0.4.0 (9d0dc7a)
Virtualbox version: 5.0.0 r101573
$ docker-machine create -d virtualbox default
Creating CA: /Users/bregor/.docker/machine/certs/ca.pem
Creating client certificate: /Users/bregor/.docker/machine/certs/cert.pem
Image cache does not exist, creating it at /Users/bregor/.docker/machine/cache...
No default boot2docker iso found locally, downloading the latest release...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.8.0/boot2docker.iso to /Users/bregor/.docker/machine/cache/boot2docker.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
And I see "Starting VM..." line for about 3 hours now.
P.S.
$ docker-machine ls
Password:
Password:NAME ACTIVE DRIVER STATE URL SWARM
default virtualbox Timeout
$ Password:
What password?..
Probably the SSH password (you can try tcuser
to see if that works), but it shouldn't really be showing that. Does docker-machine --native-ssh ls
fare any better?
cc @jeffdm this seems related to some of the toolbox quickstart hangs we've been seeing.
tcuser
is not accepted.
$ docker-machine --native-ssh ls
NAME ACTIVE DRIVER STATE URL SWARM
default virtualbox Timeout
I seem to be having the exact same problem as well.
@Bregor @daemonza Could you try removed ~/.docker/machine/cache
and trying again? It may have been something wrong with the download of the ISO.
$ rm -fr ~/.docker/machine
$ docker-machine create -d virtualbox default
Creating CA: /Users/bregor/.docker/machine/certs/ca.pem
Creating client certificate: /Users/bregor/.docker/machine/certs/cert.pem
Image cache does not exist, creating it at /Users/bregor/.docker/machine/cache...
No default boot2docker iso found locally, downloading the latest release...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.8.1/boot2docker.iso to /Users/bregor/.docker/machine/cache/boot2docker.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
For about half an hour already.
Is there any logs around or something?
I have the same issue, stuck in "Starting VM...":
OS X 10.10.5
Virtualbox 5.0.0.101573 (very latest)
docker-machine version 0.4.0 (9d0dc7a)
On Virtualbox, I can see in the preview that the VM has booted, and is in the shell.
I can manually SSH into it.
Here is the /var/log/boot2docker.log : https://gist.github.com/maximeg/8b24cc7a917440469ba2
There are errors on it, but don't know if it is critical or not.
I tried with docker-machine installed by brew. When I tried with Docker Toolbox, and with the Docker shell, I could see that it was looping on trying to ssh into the freshly created "default" VM. I tried manually and I managed to ssh in (after "yes"ing at the known hosts check).
On a new machine, I had to reinstall everything :
OS X 10.10.5
Virtualbox 5.0.3.102137 (latest Test build)
docker-machine version 0.4.1 (e2c88d6)
Seems fixed with 0.4.1. Dunno which of the 3 commits solved it.
[edit] The issue was with ssh ControlMaster, see below.
Just for the record, I installed Virtualbox 5.0.2 and hit a serious issue keeping it from launching any VM. I had to test the latest Test build (5.0.3-102137), and with it, everything ran fine.
Anyway, solved for me.
Same problem here with 0.4.1 on 10.11 PB5, even after removing ~/.docker entirely
$ docker-machine create -d virtualbox dev
Creating CA: /Users/renaudg/.docker/machine/certs/ca.pem
Creating client certificate: /Users/renaudg/.docker/machine/certs/cert.pem
Image cache does not exist, creating it at /Users/renaudg/.docker/machine/cache...
No default boot2docker iso found locally, downloading the latest release...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.8.1/boot2docker.iso to /Users/renaudg/.docker/machine/cache/boot2docker.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
and
$ docker-machine ls
Password:NAME ACTIVE DRIVER STATE URL SWARM
dev virtualbox Timeout
[renaudg@Renauds-MBP-2015 ~]$
Password:
Password:
Actually, I was on Vbox 5.0.0. Upgraded to 5.0.2 and different issue now when running docker-machine -D create -d virtualbox dev
:
executing: /usr/local/bin/VBoxManage modifyvm dev --natpf1 delete ssh
STDOUT:
STDERR: VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1766 of file VBoxManageModifyVM.cpp
executing: /usr/local/bin/VBoxManage modifyvm dev --natpf1 ssh,tcp,127.0.0.1,56719,,22
STDOUT:
STDERR:
executing: /usr/local/bin/VBoxManage startvm dev --type headless
STDOUT: Waiting for VM "dev" to power on...
VM "dev" has been successfully started.
STDERR:
Error creating machine: exit status 1
You will want to check the provider to make sure the machine and associated resources were properly removed.
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
dev virtualbox Stopped
Can confirm I am having this issue as well. Tried upgrading virtualbox to latest test, 5.0.3r102220, no dice. Docker toolbox 1.0.1b
Here is a gist of the command line: docker-machine create -d virtualbox dev --debug
https://gist.github.com/crioux/1e94febca7bb8c1a19cc
Note the presence of spurious "STDERR: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory"
I just had a thought: on my new machine, I didn't restore yet my .ssh/config
(I'll have access to it on Sunday only) that includes various options including ControlMaster
ones.
I just reproduced it with ControlMaster set, and without, everything is just fine. @crioux, @renaudguerin do you have such thing in your ssh config ?
@maximeg: Nope, nothing like that on this machine.
Indeed I'm using ControlMaster and other options, will try without. But I suggest docker-machine should disable whatever ssh options it's incompatible with
On Thu, Aug 20, 2015 at 8:17 PM, Maxime Garcia [email protected]
wrote:
I just had a thought: on my new machine, I didn't restore yet my
.ssh/config
(I'll have access to it on Sunday only) that includes various options includingControlMaster
ones.I just reproduce it with ControlMaster set, and without, everything is just fine. @crioux, @renaudguerin do you have such thing in your ssh config ?
Reply to this email directly or view it on GitHub:
https://github.com/docker/machine/issues/1684#issuecomment-133105974
Oh, it seems that the issue with ControlMaster was taken care by #1630. It is fixed and attended for 0.4.2.
@crioux your issue seems related to VirtualBox, because your error is after each vbox command. In what directory do you launch the command ? Try to cd
before to get back into your $HOME.
Do you run it right after starting a shell ? Try to cd
too. You may have something fishy into your .bashrc / .bash_profile / .zshrc ... files.
removed .bash_profile, started new shell, in ~, and same problem.
even with new shell, running just cd
, then the docker-machine
cmd ?
With no .bash_profile:
Last login: Thu Aug 20 12:14:48 on ttys000
$ cd
$ docker-machine create -d virtualbox dev
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
No .bash_profile, uninstalled VirtualBox completely and removed ~/Library/VirtualBox and removed ~/.docker, and reinstalled docker toolbox, and problem still exists, exactly the same.
The connection being made from localhost to localhost:49630 gets a SYN and then a RST. Something isn't letting it access that port. I've turned off 'pf' and 'little snitch' and anything else that could be getting in the way, and i'm not seeing why it can't connect. A normal 'ssh' to that port from the console succeeds.
During the "Starting VM" being stuck (ssh connection trying in loop), I was able to connect via ssh manually too, on my old machine.
And with a blank .ssh/config
? I try to remember what things I had on the former machine that I did not do on the new one (unfortunately, I can't access it, it has been stolen).
SOLVED: The problem is that virtualbox is listening only on the IPv4 address for it's port forwarding to the ssh port. My /etc/hosts file has a line for localhost going to the IPv6 localhost address:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
Commenting out the line for ::1 causes things to work. Note the line "testing tcp connection", it's resolving 'localhost', rather than going directly to the 127.0.0.1 IPv4 address.
Removing the option to connect to the nonexistant port on the IPv6 address causes the problem to go away.
That said, i'm not convinced from the debug output that there's no other issues here of similar ilk, but it seems to be working for me well enough now. Devs should look for issues of this type in general.
Oh nice!
Hey guys, I had the same issue on Windows 8.1 and made some investigation. According to it there might be some issues related to external ssh client:
$ docker-machine.exe -D ls > docker-machine-timeout-gitbash.log
$ ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1m 19 Mar 2015
> docker-machine.exe -D ls > docker-machine-timeout-cygwin-zsh.log
> ssh -V
OpenSSH_6.8p1, OpenSSL 1.0.2a 19 Mar 2015
> docker-machine.exe --native-ssh ls
NAME ACTIVE DRIVER STATE URL SWARM
local * virtualbox Running tcp://192.168.99.100:2376
--- D:\Work\docker-machine-timeout-cygwin-zsh.log
+++ D:\Work\docker-machine-timeout-gitbash.log
@@ -299,7 +299,7 @@
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
-&{D:\Cygwin\bin\ssh.exe [D:\Cygwin\bin\ssh.exe -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i C:\Users\Andrii_Melekhovskiy\.docker\machine\machines\local\id_rsa -p 64721 docker@localhost ip addr show dev eth1] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
+&{C:\Program Files (x86)\Git\bin\ssh.exe [C:\Program Files (x86)\Git\bin\ssh.exe -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i C:\Users\Andrii_Melekhovskiy\.docker\machine\machines\local\id_rsa -p 64721 docker@localhost ip addr show dev eth1] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> 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:47:c9:e5 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
@@ -617,6 +617,22 @@
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
-&{D:\Cygwin\bin\ssh.exe [D:\Cygwin\bin\ssh.exe -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i C:\Users\Andrii_Melekhovskiy\.docker\machine\machines\local\id_rsa -p 64721 docker@localhost ip addr show dev eth1] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
-NAME ACTIVE DRIVER STATE URL SWARM
-local virtualbox Timeout
+&{C:\Program Files (x86)\Git\bin\ssh.exe [C:\Program Files (x86)\Git\bin\ssh.exe -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i C:\Users\Andrii_Melekhovskiy\.docker\machine\machines\local\id_rsa -p 64721 docker@localhost ip addr show dev eth1] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> 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:47:c9:e5 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:fe47:c9e5/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:47:c9:e5 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:fe47:c9e5/64 scope link
+ valid_lft forever preferred_lft forever
+
+END SSH
+
+NAME ACTIVE DRIVER STATE URL SWARM
+local * virtualbox Running tcp://192.168.99.100:2376
@crioux works for me, thanks!
I needed 2 things to make this work :
Is this being looked at ?
Also had this issue and can confirm that commenting out the ::1 line in /etc/hosts worked for me too. I am on Windows 7 and used Docker Toolbox 1.8.2a.
Wow, nice catch @crioux. The ControlPersist
issues should be fixed on master but I'm not sure how to fix the localhost
issues. Perhaps we could assume localhost
is 127.0.0.1
where relevant and use that directly? cc @ehazlett
Had the same problem and removing .ssh/config (with both ControlMaster and ControlPersist enabled) solved this for me.
I am facing the similar issue on Windows 8 machine, can someone suggest how to fix it?
@Passion4Architecture Try the master build. If that doesn't work, trying commenting out the ::1
line in your hosts file.
I found that the master build doesn't actually fix this problem. I thought it had fixed this issue for me, but it turned out to only appear so because I was running the Docker Quickstart shortcut for the second time after a clean install. With the out-of-the-box install, the first attempt to run always hangs on the VM creation step, but if you try a second time, the VM creation step will not hang.
Even if I first replace the docker machine executable with the master build prior to attempting to run the quick start following a clean install, the first attempt will hang. If I either wait for it to time out or ctrl-c out and then try to run the quick start again, the VM creation step will not hang, but once the vm shell is started, it can't be used for doing anything. Basic commands like docker info don't run, complaining that there's no 'docker' in the path.
line ::1
is commented out already on my windows 10 box, ControlPersist no
seemed to solve this. It was working without the change on some occasion fiddeling arround manually with the VirtualBox network settings...
Brand new to docker. Just now running through the 'Install Docker for Windows' tutorial. Not a linux guy. I am having this exact issue on Windows 8.1. Just running what comes in the installer package. This is kind of a blocker for me to learn and try to figure out if this is a tool I can add to my project. I will try to follow the advice here... An FAQ or fix to the tutorial or updating the install package would really help. As of right now, this is a blocker.
Just to summarize, I need to do the following?
"ControlPersist no" in ~/.ssh/config
No IPv6 entries for localhost in /etc/hosts at all (I had ::1 and also fe80::1%lo0 )
@apocalypse2012 Did those two solutions fix the issue for you?
No... I am not sure how to SSH in. Its been a while since I did anything in linux. So I went looking in VB for an IP to connect to. I can see the default boot2docker VM, but it said it was not running. So I did a cntl-c on the Docker-terminal Window and it went away. Not sure if I need to rerun docker-terminal or restart from VB or what my order of operations is here.
ps: looks like from the log files that it was definately chocking on the ip6 stuff. could not really tell anything else. Will try to are from VB and SSH in I guess. Hopefully I don't break anything.
pss: virtual box error:
Callee RC:
E_FAIL (0x80004005)
I reinstalled. The VM is running, but how do I login? What is the default username and password. Why is this system broken out of the box?
@apocalypse2012 You should be able to SSH in with docker-machine ssh vmname
. The user is docker
and the password is tcuser
, but you shouldn't be prompted for credentials.
@nathanleclaire when can we expect a release from master including the multiplexing fix? Right now only --native-ssh
ends up working.
@scalp42 Approximately two weeks' time.
This forums is really helpful. On windows 8.1, by default, both the lines are commented in the etc/hosts file
127.0.0.1 localhost
::1 localhost
Uncommenting (removing the hash tag) from the first line makes it work.
Another fixed... On Windows 7 I uncommented
127.0.0.1 localhost
and got unstuck from the "Starting VM" problem
Since this issue has mostly users who have an SSH configuration issue and/or an issue with localhost
lookup (both of which have fixes on master), I'm going to close this. If using a master or 0.5.0 (soon to be released) build does not clear up the problem, please file a new issue.
Same here for windows 7: uncomenting 127.0.0.1 localhost in etc/hosts fixed it.
Running OSX el Capitan, adding 127.0.0.1 to /etc/hosts seems to fix the problem for me as well.
127.0.0.1 localhost
on windows also made it work.
➜ ~ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
#::1 localhost
➜ ~ cat .ssh/config
ControlPersist no
I am still getting stuck at Starting VM...
. (Although I am able to docker-machine ssh vmname
from another terminal)
Is there something else I should be looking at?
I have tried installing previous version of VB (4.x) and I have also tried installing docker using docker toolbox and brew (after completely uninstalling previous copy).
[Edit1: Adding some more data]
➜ ~ VBoxManage list hostonlyifs
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
Name: vboxnet1
GUID: 786f6276-656e-4174-8000-0a0027000001
DHCP: Disabled
IPAddress: 192.168.7.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet1
Name: vboxnet2
GUID: 786f6276-656e-4274-8000-0a0027000002
DHCP: Disabled
IPAddress: 192.168.59.3
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:02
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet2
Name: vboxnet3
GUID: 786f6276-656e-4374-8000-0a0027000003
DHCP: Disabled
IPAddress: 192.168.70.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:03
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet3
➜ ~ netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGSc 162 1 en0
127 127.0.0.1 UCS 1 0 lo0
127.0.0.1 127.0.0.1 UH 2 878 lo0
169.254 link#4 UCS 1 0 en0
192.168.1 link#4 UCS 3 0 en0
192.168.1.1/32 link#4 UCS 2 0 en0
192.168.1.1 4c:60:de:2a:42:74 UHLWIir 163 434 en0 1190
192.168.1.135/32 link#4 UCS 1 0 en0
192.168.1.141 74:e5:b:df:6c:0 UHLWIi 1 0 en0 1159
192.168.1.255 link#4 UHLWbI 1 67 en0
192.168.99 link#10 UC 3 0 vboxnet
192.168.99.255 link#10 UHLWbI 1 54 vboxnet
Internet6:
Destination Gateway Flags Netif Expire
::1 ::1 UHL lo0
fe80::%lo0/64 fe80::1%lo0 UcI lo0
fe80::1%lo0 link#1 UHLI lo0
fe80::%en0/64 link#4 UCI en0
fe80::9a5a:ebff:fe89:bff0%en0 98:5a:eb:89:bf:f0 UHLI lo0
fe80::%awdl0/64 link#8 UCI awdl0
fe80::64cb:aaff:fe3a:8bea%awdl0 66:cb:aa:3a:8b:ea UHLI lo0
ff01::%lo0/32 ::1 UmCI lo0
ff01::%en0/32 link#4 UmCI en0
ff01::%awdl0/32 link#8 UmCI awdl0
ff02::%lo0/32 ::1 UmCI lo0
ff02::%en0/32 link#4 UmCI en0
ff02::%awdl0/32 link#8 UmCI awdl0
Try also to uncomment the ipv6 one :
::1 localhost
But wait!
If I really need ControlPersist
there is no way to use docker-machine?
boot2docker
is not affected, but deprecated and which options I have when it will be buried?
@anth0 - Isn't that what @crioux wanted us to comment? It was uncommented earlier, (and I re tried that now again) But no use.
If I really need ControlPersist there is no way to use docker-machine?
@Bregor Really need it for what?
Because I need master connection to be opened in the background when multiplexing.
By the way, I can try to turn it off for specific host.
How can I describe docker-machine's default host in ~/.ssh/config
?
@crioux good job!
I was getting the same error but my fix was totally different. After adding -D to the docker-machine command in start.sh I noticed it couldn't ssh to the VM while updating the certs. So I deleted the "default" VirtualBox image, nuked the interfaces created by VirtualBox and reran start.sh. It's working for me now.
VBoxManage controlvm default poweroff
VBoxManage unregistervm default --delete
VBoxManage hostonlyif remove vboxnet0
VBoxManage hostonlyif remove vboxnet1
VBoxManage hostonlyif remove vboxnet2
Oh, i had previously only deleted the image several time. When I deleted the vbox interfaces that was the trick.
@vlajbert That fixed my problem as well. Thanks.
Give @vlajbert man a cookie!
Thanks man! Your approach did the trick for me! :)
I did what @vlajbert did but perhaps in a simpler manner.
I opened VirtualBox, stopped the docker machine, deleted it.
Then I reran the terminal.
Running El Capitan, OSX.
Had the same error on El Capitan OSX, fixed with @vlajbert's method.
the following worked for me on OSX (issue was there were multiple host only networks using the same ip address)
VBoxManage list hostonlyifs
Once you get the name from the above command, remove one of the hostonly networks using the following command
VBoxManage hostonlyifs remove “name”
Same error fixed following @vlajbert's approach. Thanks!
Mac OS X 10.11.2
docker-machine version 0.5.4, build 6643d0e
Docker version 1.9.1, build a34a1d5
Hello Team,
I have solve the issue using below command.
docker-machine provision
Ashish.
All the options mentioned above did not solve the issue. The only thing help was downgrading boot2docker image - look like the error started with v1.13.0, downgrading to v1.12.6 solved the issue.
I just spent 2 hours diagnosing this, and it turned out to be the Windows 10 Firewall. I turned it off, and it made it past (default) Waiting for an IP...