-
Notifications
You must be signed in to change notification settings - Fork 2k
docker-machine create is hanging with driver virtualbox : SSH cmd err, output: exit status 255: #1591
Comments
I believe this is the same issue I'm having on MacOSX. Have tried a few times to create a new VirtualBox Dev VM from scratch. Have cleaned out .docker/ and even downgraded from VBOX 5.
Let me know what specific logs / info you might need; the following is my debug log info: STDERR: executing: /usr/bin/VBoxManage modifyvm docker-vm --nic2 hostonly --nictype2 82540EM --hostonlyadapter2 vboxnet2 --cableconnected2 on STDOUT: STDERR: executing: /usr/bin/VBoxManage modifyvm docker-vm --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 1717 of file VBoxManageModifyVM.cpp executing: /usr/bin/VBoxManage modifyvm docker-vm --natpf1 ssh,tcp,127.0.0.1,50083,,22 STDOUT: STDERR: executing: /usr/bin/VBoxManage startvm docker-vm --type headless STDOUT: Waiting for VM "docker-vm" to power on... VM "docker-vm" has been successfully started. STDERR: Starting VM... Getting to WaitForSSH function... Testing TCP connection to: localhost:50083 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 /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker@localhost exit 0] [] [] ?reflect.Value? false [] [] [] [] } SSH cmd err, output: exit status 255: Error getting ssh command 'exit 0' : exit status 255 Getting to WaitForSSH function... Testing TCP connection to: localhost:50083 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 /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker@localhost exit 0] [] [] ?reflect.Value? false [] [] [] [] } SSH cmd err, output: exit status 255: Error getting ssh command 'exit 0' : exit status 255 Getting to WaitForSSH function... Testing TCP connection to: localhost:50083 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 /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker@localhost exit 0] [] [] ?reflect.Value? false [] [] [] [] } SSH cmd err, output: exit status 255: Error getting ssh command 'exit 0' : exit status 255 Getting to WaitForSSH function... Testing TCP connection to: localhost:50083 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 /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker@localhost exit 0] [] [] ?reflect.Value? false [] [] [] [] } I'm able to log into the VM manually, and it seems to be OK - so I think the issue is with docker-machine not being able to get the status correctly. |
I got a docker-machine environment working with:
(FYI - Manually installed it since homebrew-cask doesn't have anything newer than v0.3.0 as of yet) However, on 'create', docker-machine still hung and I had to 'regenerate-certs' for my 'docker-vm' in order to fully get a 'docker-machine env docker-vm' to work. Putting it out there for anyone else that's having similar issues. At least I have a working docker-machine environment now - without having to revert to boot2docker. Only wasted the whole day on this however :( |
@tehmaspc the same issue with you, And I didn't find a solution |
I'm seeing the same thing on MacOS X Yosemite 0.4.0-rc1
Just hangs forever... Env Info:
|
FWIW, I downgraded to 4.3.x VBOX and I did a regenerate cert command to get past this. Make sure to try that with a fresh VM. Good luck. |
@opskumu @wmiller848 - so I just came across this issue: #1572 I use SSH multiplexing in my ~/.ssh/config file; I just disabled these settings and I'm getting docker-machine to work properly. Even my workaround above wasn't really working consistently but with SSH multiplexing disabled it seems to have been the fix. Wondering if you guys have SSH multiplexing enabled??? My ~/.ssh/config file is now: % cat ~/.ssh/config Host * TCPKeepAlive yes ServerAliveInterval 10 ServerAliveCountMax 10 ForwardAgent yes # ControlMaster auto # ControlPath ~/.ssh/sockets/%r@%h-%p # ControlPersist 300 Cheers, |
Disabling SSH multiplexing worked for me too (on OS X 10.10.4). Thank you @tehmaspc! |
@ehazlett I have already test the 0.4.0,It's also not work.
@tehmaspc Diablling ssh multiplexing doesn't work for me too. There are also have a problem on Win10 with docker-machine 0.4.0:
|
Not sure if this helps, but following similar problems I noticed the ssh port was not set in my machine's config file ( |
For what it's worth, removing the multiplex settings in my SSH config fixed this for me. Nothing else I tried in any of the other open issues was working, but now everything appears to work great. Perhaps the VM setup script should consider using the SSH |
@chrisfosterelli yup +1 ; cc @ehazlett - loads of people are continuing to have this issue; should we bump this? thanks, |
The problem has been so hit and miss. It would be great to crowd source the potential fix with everyone that's part of this discussion to ensue it mitigates the issue. |
Removing ssh mutliplexing fixed this for me as well. |
Has anyone found disabling ssh multiplexing fixed the issue on Linux, as opposed to Mac. I am still seeing issue on Ubuntu with it disabled. People say it fixed it for them, but don't note Linux, Windows, or Mac. |
I don't have ssh multiplexing turned on, but I am still seeing this issue. ~$sw_vers |
I'm also seeing the following error:
I used the default Docker Machine install and let it install VirtualBox since I didn't already have it on this particular computer. The only thing potentially odd I have is a homebrew version of OpenSSH with strict crypto requirements. Here's the details of my environment:
|
Having same issue.
Not sure why, but my issue is a bad config.json for the machine. It's missing the machine's IP and port. |
Also having the same problem... I'm using boot2docker until this is fixed.
|
I'm having the same issue here: $ docker --version; docker-machine --version; VBoxManage --version; sw_vers 2.2.2 16:52
Docker version 1.8.1, build d12ea79
docker-machine version 0.4.1 (e2c88d6)
5.0.3r102322
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F27 Thanks |
Same issue here:
I downgraded VBox from 5.x to 4.3.x and it worked for a few hours, then gave the same SSH error. |
I have same issue. I have found workaround for this bug:
|
Thanks @ecylmz. +1 for your workaround. I still saw this error, but it successfully created the machine.
|
Kudos to @ecylmz for the workaround, it also worked for me. Only caveat is that I need to run It's also worth noting that upgrading to Docker Toolbox 1.8.1c didn't fix this issue. |
|
|
I had corrupt ~/.ssh/config . Once I corrected it, I was able to create machine like before. One way to check this is trying to ssh to some other server and see if it works to make sure the docker-machine isn't failing due to ssh. |
Same issue and nothing worked . My Env Details: |
@tehmaspc #1591 (comment) works for me, with some workarounds suggested by @trentm. |
I ran into this on Windows 10 today after a small upgrade in my Docker install. I tried everything - removing I seemed like there must be an issue with the VBox networks that happens during the upgrade process or something. Like the expected IP address was taken and it all blew up after that. |
I had the same issue. Apparently I had an OpenSSH installed before and it was taking it while creating the docker image which led to the ControlMaster error. I uninstalled it, added Git\bin to the path and it worked like a charm. |
I'm having this same problem, and the proposed workarounds on this page have not had any effect. Any ideas? Here is my environment: Docker version 1.10.3, build 20f81dd When I issue this command: docker-machine --debug create -d virtualbox default ...it always eventually hangs on this error, which is printed to the terminal repeatedly until I manually interrupt it: (default) DBG | Getting to WaitForSSH function... |
@nathanleclaire can you take a look at my comment above? I'm on Mac El Cap, and everything I'm using - Docker, Docker Machine, VirtualBox, OS updates - is the very latest version. Nothing I've seen as potential fixes in this or related issue pages has worked. I think it's something about my configuration, because it affects two similarly-configured Macs I have. I use Homebrew for latest Docker, Docker Machine, OpenSSH, and OpenSSL. I have VirtualBox installed from its own binary, but I've previously tried installing it via Homebrew as well (but not currently). Any ideas? Thanks! |
I don't have EL Cap yet so I cannot share my experience w/r/t that OS. An alternative is to get into the Docker for Mac beta which eliminates Virtualbox requirements altogether. Of course it might have other issues :) https://blog.docker.com/2016/03/docker-for-mac-windows-beta/ |
@chrisbenson What's your What's the output of |
@nathanleclaire Sorry for the delay getting back to you. I temporarily gave up and didn't check back quickly. I'll be more vigilant waiting for your replies going forward. It's not the After I run Then I enter OpenSSH_7.2p2, OpenSSL 1.0.2g 1 Mar 2016 |
@chrisbenson Just to make sure, what's the contents of |
@nathanleclaire Here's the result of 'cat /usr/local/etc/ssh/ssh_config':
|
Hm, OK, so nothing's set. Can you try the 0.7.0 release to see if you fare any better (it's brand new, so you'll have to download the binaries as Toolbox hasn't been baked yet) |
@nathanleclaire I tried 0.7.0, but it made no difference. Getting exactly the same error. Any other ideas? Thanks! |
@chrisbenson Does |
@nathanleclaire It exhibits the same issue, Nathan. |
@chrisbenson You have any kind of firewall / VPN / proxy on? |
@nathanleclaire No sir, not a thing. I'm working on a modern, completely updated MacBook Pro running El Capitan. I keep everything (Docker, Docker Machine, OpenSSL, OpenSSH) updated with Homebrew, except I installed VirtualBox using their download binary. There is nothing remarkable about my setup, which is why I'm stumped. |
@chrisbenson Couple things to please try:
|
--native-ssh works for me, but this problem occurs everytime I start a new terminal session in OS X. I've had nothing but problems with docker-machine in production, I hope the upcoming Docker for Mac solves these issues. |
This is happening on windows 7, latest docker toolbox, when i put the pc to sleep at night. When I wake the PC all docker-machine commands time out, but i can docker-machine ssh $node just fine. Inside the nodes, docker is running fine and containers i launched the previous day are still running. $ docker -v && docker-machine -v |
$ docker-machine env $ docker-machine regenerate-certs [machine name] $ docker-machine ls |
Wow three YEARS later on WIN7x64 here and this is STILL HAPPENING!!! Isn't it time to fix it or just call the product broken when it's IMPOSSIBLE to issue a simple 1st default create command due to this?
|
Unfortunately I have the same issue. It seems I read all links in google and nothing can fix the problem. Please help! Is it correct to create machines inside VPS like DigitalOcean droplet? I have the problem on the such server:
I tried create ssh config:
Using |
@tenorok You can't nest virtualization in most cloud providers which is what attempting to create a VirtualBox machine on DO would be doing. |
Getting this issue in 2020.
|
docker-machine create is hanging,the debug logs:
The text was updated successfully, but these errors were encountered: