New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck waiting for VM to start and Bad port '0' on virtualbox driver on mac #878

Closed
mattreyuk opened this Issue Mar 26, 2015 · 23 comments

Comments

Projects
None yet
@mattreyuk

mattreyuk commented Mar 26, 2015

creating a virtualbox machine with docker-machine create --driver virtualbox devVM leads to output:

INFO[0000] Creating SSH key...
INFO[0001] Creating VirtualBox VM...
INFO[0010] Starting VirtualBox VM...
INFO[0011] Waiting for VM to start...

it then hangs. Looking at the virtualBox manager it shows the machine running. If i try and run other commands in another window (eg docker-machine ls ) I get the following:

Bad port '0'
ERRO[0000] error getting URL for host devVM: exit status 255
NAME ACTIVE DRIVER STATE URL SWARM
devVM virtualbox Running

@ehazlett

This comment has been minimized.

Show comment
Hide comment
@ehazlett

ehazlett Mar 26, 2015

Member

Hey thanks for reporting! We currently have a PR (#828) for this issue. It is in our allocation for a high port for virtualbox. You can usually fix the issue by removing the machine and re-creating.

Member

ehazlett commented Mar 26, 2015

Hey thanks for reporting! We currently have a PR (#828) for this issue. It is in our allocation for a high port for virtualbox. You can usually fix the issue by removing the machine and re-creating.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Apr 1, 2015

Contributor

This should be fixed by #828 cc @ehazlett to close

Contributor

nathanleclaire commented Apr 1, 2015

This should be fixed by #828 cc @ehazlett to close

@ehazlett

This comment has been minimized.

Show comment
Hide comment
@ehazlett

ehazlett Apr 2, 2015

Member

@mattreyuk please re-open if you experience again. thanks for reporting!

Member

ehazlett commented Apr 2, 2015

@mattreyuk please re-open if you experience again. thanks for reporting!

@ehazlett ehazlett closed this Apr 2, 2015

@mattreyuk

This comment has been minimized.

Show comment
Hide comment
@mattreyuk

mattreyuk Apr 2, 2015

I tried with a build from master [be9113a] that should have this fix in and I still have the same issue. I also tried upgrading my virtual box to 4.3.26 (prior was running 4.3.20) no dice.

mattreyuk commented Apr 2, 2015

I tried with a build from master [be9113a] that should have this fix in and I still have the same issue. I also tried upgrading my virtual box to 4.3.26 (prior was running 4.3.20) no dice.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Apr 2, 2015

Contributor

@mattreyuk Any chance you ran the command with -D mode and could paste the create output?

Contributor

nathanleclaire commented Apr 2, 2015

@mattreyuk Any chance you ran the command with -D mode and could paste the create output?

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Apr 2, 2015

Contributor

Also, what's your base OS and is there any VPN or firewall at play?

Contributor

nathanleclaire commented Apr 2, 2015

Also, what's your base OS and is there any VPN or firewall at play?

@mattreyuk

This comment has been minimized.

Show comment
Hide comment
@mattreyuk

mattreyuk Apr 3, 2015

I'm away from my computer for a few days but I'll try that and report back.

mattreyuk commented Apr 3, 2015

I'm away from my computer for a few days but I'll try that and report back.

@nodefourtytwo

This comment has been minimized.

Show comment
Hide comment
@nodefourtytwo

nodefourtytwo Apr 5, 2015

I'm using Arch Linux as a base OS, no VPN, no firewall, same problem with 2.0_rc3

# docker-machine create --driver virtualbox host1
INFO[0000] Creating SSH key...                          
INFO[0000] Creating VirtualBox VM...                    
INFO[0008] Starting VirtualBox VM...                    
INFO[0008] Waiting for VM to start...

and in another terminal:

# docker-machine -v
docker-machine version 0.2.0 (48bea37)
# docker-machine ls
Bad port '0'
ERRO[0000] error getting URL for host host1: exit status 255 
NAME    ACTIVE   DRIVER       STATE     URL   SWARM
host1            virtualbox   Running         
# vboxmanage list runningvms
"host1" {8b1efcb5-161c-49b0-a188-7134ccc40661}

nodefourtytwo commented Apr 5, 2015

I'm using Arch Linux as a base OS, no VPN, no firewall, same problem with 2.0_rc3

# docker-machine create --driver virtualbox host1
INFO[0000] Creating SSH key...                          
INFO[0000] Creating VirtualBox VM...                    
INFO[0008] Starting VirtualBox VM...                    
INFO[0008] Waiting for VM to start...

and in another terminal:

# docker-machine -v
docker-machine version 0.2.0 (48bea37)
# docker-machine ls
Bad port '0'
ERRO[0000] error getting URL for host host1: exit status 255 
NAME    ACTIVE   DRIVER       STATE     URL   SWARM
host1            virtualbox   Running         
# vboxmanage list runningvms
"host1" {8b1efcb5-161c-49b0-a188-7134ccc40661}
@ehazlett

This comment has been minimized.

Show comment
Hide comment
@ehazlett

ehazlett Apr 6, 2015

Member

@nodefourtytwo thanks for reporting. can you report what you network scheme is? i.e. local IP and vbox host-only address space as well?

Member

ehazlett commented Apr 6, 2015

@nodefourtytwo thanks for reporting. can you report what you network scheme is? i.e. local IP and vbox host-only address space as well?

@nodefourtytwo

This comment has been minimized.

Show comment
Hide comment
@nodefourtytwo

nodefourtytwo Apr 6, 2015

Not sure that's what you're asking for but here it is:
local IP is on 192.168.1.0/24
vbox IP is on 192.168.99.0/24

nodefourtytwo commented Apr 6, 2015

Not sure that's what you're asking for but here it is:
local IP is on 192.168.1.0/24
vbox IP is on 192.168.99.0/24

@mattreyuk

This comment has been minimized.

Show comment
Hide comment
@mattreyuk

mattreyuk Apr 6, 2015

@nathanleclaire I'm running OSX 10.9.5, no firewall, no VPN. I created a gist of the -D output at https://gist.github.com/mattreyuk/1ee391e845c1e21ad401 If I stop and restart the VM in the virtual box manager, it looks like it was created ok

mattreyuk commented Apr 6, 2015

@nathanleclaire I'm running OSX 10.9.5, no firewall, no VPN. I created a gist of the -D output at https://gist.github.com/mattreyuk/1ee391e845c1e21ad401 If I stop and restart the VM in the virtual box manager, it looks like it was created ok

@bfil

This comment has been minimized.

Show comment
Hide comment
@bfil

bfil Apr 15, 2015

I'm still having issues with this as well, I've tried the following version:

docker-machine_darwin-amd64 version 0.2.0 (e4c2173)

Sometimes it managed to start a machine up, so it seems like it improved since version 0.1.0, but still hangs most of the times.

I'm running OSX 10.9.5 as well, with no particular network configuration.

bfil commented Apr 15, 2015

I'm still having issues with this as well, I've tried the following version:

docker-machine_darwin-amd64 version 0.2.0 (e4c2173)

Sometimes it managed to start a machine up, so it seems like it improved since version 0.1.0, but still hangs most of the times.

I'm running OSX 10.9.5 as well, with no particular network configuration.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Apr 15, 2015

Contributor

Thanks for the report @bfil . If you could paste some output of failed docker-machine -D create -d virtualbox foo type commands it would be very helpful! (note the -D - it's for debug output)

Contributor

nathanleclaire commented Apr 15, 2015

Thanks for the report @bfil . If you could paste some output of failed docker-machine -D create -d virtualbox foo type commands it would be very helpful! (note the -D - it's for debug output)

@bfil

This comment has been minimized.

Show comment
Hide comment
@bfil

bfil Apr 15, 2015

No problem, here it is: https://gist.github.com/bfil/76498a4b019d1183487d

Just to confirm: it did work on my first attempt to generate this log, then the second time just got stuck at "Waiting for VM to start... ".

bfil commented Apr 15, 2015

No problem, here it is: https://gist.github.com/bfil/76498a4b019d1183487d

Just to confirm: it did work on my first attempt to generate this log, then the second time just got stuck at "Waiting for VM to start... ".

@ehazlett

This comment has been minimized.

Show comment
Hide comment
@ehazlett

ehazlett Apr 16, 2015

Member

This looks like perhaps another network related issue. We are seeing more of these.

@bfil could you paste the output of VBoxManager list hostonlyifs

Member

ehazlett commented Apr 16, 2015

This looks like perhaps another network related issue. We are seeing more of these.

@bfil could you paste the output of VBoxManager list hostonlyifs

@ruprict

This comment has been minimized.

Show comment
Hide comment
@ruprict

ruprict Apr 16, 2015

Having this same issue with the 0.2.0 prerelease...here's my output:

➜  ~  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

Hope this helps

ruprict commented Apr 16, 2015

Having this same issue with the 0.2.0 prerelease...here's my output:

➜  ~  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

Hope this helps

@ruprict ruprict referenced this issue Apr 16, 2015

Closed

Stuck at 99% #236

@bfil

This comment has been minimized.

Show comment
Hide comment
@bfil

bfil Apr 16, 2015

@ehazlett here it is:

Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.59.3
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.99.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet1

Name:            vboxnet2
GUID:            786f6276-656e-4274-8000-0a0027000002
DHCP:            Disabled
IPAddress:       192.168.33.1
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.27.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:03
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet3

Name:            vboxnet4
GUID:            786f6276-656e-4474-8000-0a0027000004
DHCP:            Disabled
IPAddress:       10.0.0.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:04
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet4

Name:            vboxnet5
GUID:            786f6276-656e-4574-8000-0a0027000005
DHCP:            Disabled
IPAddress:       172.17.8.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:05
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet5

bfil commented Apr 16, 2015

@ehazlett here it is:

Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.59.3
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.99.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet1

Name:            vboxnet2
GUID:            786f6276-656e-4274-8000-0a0027000002
DHCP:            Disabled
IPAddress:       192.168.33.1
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.27.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:03
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet3

Name:            vboxnet4
GUID:            786f6276-656e-4474-8000-0a0027000004
DHCP:            Disabled
IPAddress:       10.0.0.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:04
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet4

Name:            vboxnet5
GUID:            786f6276-656e-4574-8000-0a0027000005
DHCP:            Disabled
IPAddress:       172.17.8.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:05
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet5
@pixeldrew

This comment has been minimized.

Show comment
Hide comment
@pixeldrew

pixeldrew May 5, 2015

To fix this, I removed the virtual network adapters created previously by chef and vagrant. It then worked.

pixeldrew commented May 5, 2015

To fix this, I removed the virtual network adapters created previously by chef and vagrant. It then worked.

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Jun 24, 2015

EDIT: I'm actually affected by #479

currently having a similar issue, mine starts OK but it seems docker-machine is not able to SSH into the machine.

full log: https://gist.github.com/kalbasit/03bf8464a6163d485a6f

I tried multiple times, I tried removing Vbox's adapter and no luck.

STDERR:
using 192.168.99.1 for dhcp address
executing: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT: 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


STDERR:
executing: /usr/local/bin/VBoxManage modifyvm dev --nic2 hostonly --nictype2 82540EM --hostonlyadapter2 vboxnet0 --cableconnected2 on
STDOUT:
STDERR:
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 1717 of file VBoxManageModifyVM.cpp

executing: /usr/local/bin/VBoxManage modifyvm dev --natpf1 ssh,tcp,127.0.0.1,55896,,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:
Starting VM...
Getting to WaitForSSH function...
Testing TCP connection to: localhost:55896
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/kalbasit/.docker/machine/machines/dev/id_rsa -p 55896 docker@localhost 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
Getting to WaitForSSH function...
Testing TCP connection to: localhost:55896
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/kalbasit/.docker/machine/machines/dev/id_rsa -p 55896 docker@localhost 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
Getting to WaitForSSH function...
Testing TCP connection to: localhost:55896
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/kalbasit/.docker/machine/machines/dev/id_rsa -p 55896 docker@localhost exit 0] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}

kalbasit commented Jun 24, 2015

EDIT: I'm actually affected by #479

currently having a similar issue, mine starts OK but it seems docker-machine is not able to SSH into the machine.

full log: https://gist.github.com/kalbasit/03bf8464a6163d485a6f

I tried multiple times, I tried removing Vbox's adapter and no luck.

STDERR:
using 192.168.99.1 for dhcp address
executing: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT: 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


STDERR:
executing: /usr/local/bin/VBoxManage modifyvm dev --nic2 hostonly --nictype2 82540EM --hostonlyadapter2 vboxnet0 --cableconnected2 on
STDOUT:
STDERR:
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 1717 of file VBoxManageModifyVM.cpp

executing: /usr/local/bin/VBoxManage modifyvm dev --natpf1 ssh,tcp,127.0.0.1,55896,,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:
Starting VM...
Getting to WaitForSSH function...
Testing TCP connection to: localhost:55896
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/kalbasit/.docker/machine/machines/dev/id_rsa -p 55896 docker@localhost 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
Getting to WaitForSSH function...
Testing TCP connection to: localhost:55896
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/kalbasit/.docker/machine/machines/dev/id_rsa -p 55896 docker@localhost 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
Getting to WaitForSSH function...
Testing TCP connection to: localhost:55896
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/kalbasit/.docker/machine/machines/dev/id_rsa -p 55896 docker@localhost exit 0] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
@douglasjarquin

This comment has been minimized.

Show comment
Hide comment
@douglasjarquin

douglasjarquin Jul 6, 2015

I was getting this behavior as well. After reading through a bunch of issue comments, and trying a bunch of the suggestions, it turns out that modifying the stock ssh config was the fix. Props to @ctrlrsf for figuring it out, and validating it on his machine, too.

I'm running:

❯ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.4
BuildVersion:   14E46

The stock Yosemite ssh config looks like:

# Stop timing out connections
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 20

# SSH Connection pooling for faster additional connections to a machine
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r

# This makes subsequent connections go faster
ControlPersist 2h

# Make it so ssh-ing from one server to another passes keys around automagically
Host *
ForwardAgent yes

# Get rid of SSH connection delays
GSSAPIAuthentication no

I commented out all the config vars that match Control*, ran docker-machine rm dev, and then running docker-machine create dev --driver virtualbox finally succeeded.

Here's the new ssh config for reference:

# Stop timing out connections
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 20

# SSH Connection pooling for faster additional connections to a machine
#ControlMaster auto
#ControlPath /tmp/ssh_mux_%h_%p_%r

# This makes subsequent connections go faster
#ControlPersist 2h

# Make it so ssh-ing from one server to another passes keys around automagically
Host *
ForwardAgent yes

# Get rid of SSH connection delays
GSSAPIAuthentication no

diff

douglasjarquin commented Jul 6, 2015

I was getting this behavior as well. After reading through a bunch of issue comments, and trying a bunch of the suggestions, it turns out that modifying the stock ssh config was the fix. Props to @ctrlrsf for figuring it out, and validating it on his machine, too.

I'm running:

❯ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.4
BuildVersion:   14E46

The stock Yosemite ssh config looks like:

# Stop timing out connections
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 20

# SSH Connection pooling for faster additional connections to a machine
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r

# This makes subsequent connections go faster
ControlPersist 2h

# Make it so ssh-ing from one server to another passes keys around automagically
Host *
ForwardAgent yes

# Get rid of SSH connection delays
GSSAPIAuthentication no

I commented out all the config vars that match Control*, ran docker-machine rm dev, and then running docker-machine create dev --driver virtualbox finally succeeded.

Here's the new ssh config for reference:

# Stop timing out connections
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 20

# SSH Connection pooling for faster additional connections to a machine
#ControlMaster auto
#ControlPath /tmp/ssh_mux_%h_%p_%r

# This makes subsequent connections go faster
#ControlPersist 2h

# Make it so ssh-ing from one server to another passes keys around automagically
Host *
ForwardAgent yes

# Get rid of SSH connection delays
GSSAPIAuthentication no

diff

@jitakirin

This comment has been minimized.

Show comment
Hide comment
@jitakirin

jitakirin Jul 24, 2015

Looks like SSH connection multiplexing is a different issue so I opened a new bug report for that #1572

jitakirin commented Jul 24, 2015

Looks like SSH connection multiplexing is a different issue so I opened a new bug report for that #1572

@behemphi

This comment has been minimized.

Show comment
Hide comment
@behemphi

behemphi Aug 16, 2015

I did NOT change my ssh config. I can create a machine

e.g. docker-machine create foo --drive virtualbox

However, once I stop it, then I can no longer issue docker-machine start foo with success.

Interesting fact:

In a terminal with the env vars already set. If I docker-machine start foo and wait for the machine to start in Virtualbox, I can issue docker commands (e.g. docker run redis successfully`)

Naively, this seems to indicate the problem is only for an existing machine rather than machine initialization.

behemphi commented Aug 16, 2015

I did NOT change my ssh config. I can create a machine

e.g. docker-machine create foo --drive virtualbox

However, once I stop it, then I can no longer issue docker-machine start foo with success.

Interesting fact:

In a terminal with the env vars already set. If I docker-machine start foo and wait for the machine to start in Virtualbox, I can issue docker commands (e.g. docker run redis successfully`)

Naively, this seems to indicate the problem is only for an existing machine rather than machine initialization.

@jitakirin

This comment has been minimized.

Show comment
Hide comment
@jitakirin

jitakirin Aug 20, 2015

@behemphi looks like a different issue then, no?

On Mon, 17 Aug 2015 00:37 Boyd Hemphill notifications@github.com wrote:

I did NOT change my ssh config. I can create a machine

e.g. docker-machine create foo --drive virtualbox

However, once I stop it, then I can no longer issue docker-machine start
foo with success.

Interesting fact:

In a terminal with the env vars already set. If I docker-machine start foo
and wait for the machine to start in Virtualbox, I can issue docker
commands (e.g. docker run redis successfully`)

Naively, this seems to indicate the problem is only for an existing
machine rather than machine initialization.


Reply to this email directly or view it on GitHub
#878 (comment).

jitakirin commented Aug 20, 2015

@behemphi looks like a different issue then, no?

On Mon, 17 Aug 2015 00:37 Boyd Hemphill notifications@github.com wrote:

I did NOT change my ssh config. I can create a machine

e.g. docker-machine create foo --drive virtualbox

However, once I stop it, then I can no longer issue docker-machine start
foo with success.

Interesting fact:

In a terminal with the env vars already set. If I docker-machine start foo
and wait for the machine to start in Virtualbox, I can issue docker
commands (e.g. docker run redis successfully`)

Naively, this seems to indicate the problem is only for an existing
machine rather than machine initialization.


Reply to this email directly or view it on GitHub
#878 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment