Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Error getting IP address: Something went wrong running an SSH command #317

Closed
ghost opened this issue Nov 22, 2015 · 72 comments
Closed

Error getting IP address: Something went wrong running an SSH command #317

ghost opened this issue Nov 22, 2015 · 72 comments

Comments

@ghost
Copy link

ghost commented Nov 22, 2015

Hi all
I downloaded docker-machine from https://www.docker.com/docker-toolbox and installed on my mac os x el captain version 10.11. I followed the tutorials on the site and it worked fine.
Then today I start my computer and want to download mysql from docker hub.
I start Docker Quickstart Terminal and on the console, then it shows to me:

Machine default already exists in VirtualBox. 
Setting environment variables for machine default...
                    ##         .
              ## ## ##        ==
           ## ## ## ## ##    ===
       /"""""""""""""""""\___/ ===
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
       \______ o           __/
         \    \         __/
          \____\_______/
Error getting IP address: Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output : 
docker is configured to use the default machine with IP For help getting started, check out the docs at https://docs.docker.com 

Error running connection boilerplate: Error getting driver URL: Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output :

What do am I doing wrong?
Thanks

@draeb
Copy link

draeb commented Nov 23, 2015

I get the same problem on OSX 10.10.5.

@baoming
Copy link

baoming commented Nov 27, 2015

windows 10 failed too.

windows 10 64bit
toolbox 1.9.1a

Creating Machine default...
Running pre-create checks...
Creating machine...
(default) OUT | Creating VirtualBox VM...
(default) OUT | Creating SSH key...
(default) OUT | Starting VirtualBox VM...
(default) OUT | Starting VM...
Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded
Looks like something went wrong... Press any key to continue...

@owlas
Copy link

owlas commented Nov 27, 2015

I have the same set up as kostonstyle and have also had the same problem. I loaded the quickstart terminal once and all was working, I then reloaded the terminal and it has thrown this error ever since.

@draeb
Copy link

draeb commented Nov 27, 2015

I don't know why this worked (I'm new to docker), but removing the default vm and then reloading the quickstart terminal (creates a new default vm) worked for me.

@bojanstef
Copy link

@reviling would there be a way to automate this?

$ docker-machine rm default
$ docker-machine create --driver virtualbox default

@bojanstef
Copy link

I was able to recreate the issue by running

# hack/make.sh

Then ctrl-c'ing out before it completed
From: http://docs.docker.com/opensource/project/set-up-dev-env/
Specifically without "binary" at the end.

Machine default already exists in VirtualBox.
Setting environment variables for machine default...

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/


docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": tls: DialWithDialer timed out
You can attempt to regenerate them using 'docker-machine regenerate-certs name'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

@marklocker
Copy link

I'm also experiencing this error and have the same results as @reviling, running docker-machine rm default and then firing up the quickstart terminal worked for me - but I also don't know why…

I'm having to do this quite regularly, so if anyone has any ideas then please share them!

@ewilliam
Copy link

ewilliam commented Dec 4, 2015

running into the same issue here. docker-machine rm default works, though annoying.

@bobbypriam
Copy link

Encountered this issue after I ran docker pull training/sinatra, I don't know if it's relevant, but here are the full output of my terminal:

~  docker pull training/sinatra
Using default tag: latest
latest: Pulling from training/sinatra
d634beec75db: Pull complete
27fb5491e391: Pull complete
8e3415728a3f: Pull complete
630b03963440: Pull complete
962115fdbb58: Pull complete
9ea38b02c228: Pull complete
e20166048ece: Extracting [========================================>          ] 51.25 MB/62.67 MB
8b16a891bd1a: Download complete
Pulling repository docker.io/training/sinatra
f0f4ab557f95: Error pulling image (latest) from docker.io/training/sinatra, mkdir /mnt/sda1/var/lib/docker/graph/_tmp/acc5caf9b5f0080306956f9b43ae9106345e0ec675ae6e144e7ae869fa24811b: read-only file system 6e144e7ae869fa24811b: read-only file system
Error pulling image (latest) from docker.io/training/sinatra, mkdir /mnt/sda1/var/lib/docker/graph/_tmp/acc5caf9b5f0080306956f9b43ae9106345e0ec675ae6e144e7ae869fa24811b: read-only file system

You see, the e20166048ece: Extracting... part got stuck for a while and then the error pops out. I also tried one more time, but it gives me just the error.

~  docker pull training/sinatra
Using default tag: latest
latest: Pulling from training/sinatra
d634beec75db: Pulling fs layer
Pulling repository docker.io/training/sinatra
f0f4ab557f95: Error pulling image (latest) from docker.io/training/sinatra, mkdir /mnt/sda1/var/lib/docker/graph/_tmp/5d52c3b63b2a7c79b27a4d0d79ad4b544a6aacec467e6e35bb1847cb31e92097: read-only file system 6e35bb1847cb31e92097: read-only file system
Error pulling image (latest) from docker.io/training/sinatra, mkdir /mnt/sda1/var/lib/docker/graph/_tmp/5d52c3b63b2a7c79b27a4d0d79ad4b544a6aacec467e6e35bb1847cb31e92097: read-only file system

Thought the machine has stopped, so I checked, and here's where I encounter the error:

~  docker-machine start default
Machine "default" is already running.

➜  ~  docker-machine status default
Running

➜  ~  docker-machine ip default
Error getting IP address: Something went wrong running an SSH command!
command : ip addr show dev eth1
err     : exit status 255
output  :

docker-machine rm default and docker-machine create --driver virtualbox default fixed it, though... but my local images are lost! I'm still new to Docker so I find this confusing.

@illagrenan
Copy link

I have same issue on Windows 8.1.

docker --version
Docker version 1.9.1, build a34a1d5
docker-machine --version
C:\Program Files\Docker Toolbox\docker-machine.exe version 0.5.2 ( 0456b9f )
docker-compose --version
docker-compose version 1.5.2, build e5cf49d

// EDIT

Output of docker-machine ls is:

NAME      ACTIVE   DRIVER       STATE     URL   SWARM   ERRORS
default   -        virtualbox   Running                 Something went wrong running an SSH command!
command : ip addr show dev eth1
err     : exit status 255

In debug (docker-machine -D ls) mode I see:

...
(default) DBG | GuestAdditionsVersion="5.0.10 r104061"
(default) DBG | GuestAdditionsFacility_VirtualBox Base Driver=50,1449512600037
(default) DBG | GuestAdditionsFacility_VirtualBox System Service=50,1449512617542
(default) DBG | GuestAdditionsFacility_Seamless Mode=0,1449512600037
(default) DBG | GuestAdditionsFacility_Graphics Mode=0,1449512600037
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | Using SSH client type: external
(default) DBG | About to run SSH command:
(default) DBG | ip addr show dev eth1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(default) DBG | SSH cmd err, output: exit status 255: cygwin warning:
...

If I run command manually I see:

ssh ip addr show dev eth1
Bad owner or permissions on /cygdrive/c/Users/<USERNAME>/.ssh/config

Here is solution to bad owner problem: https://superuser.com/questions/348694/bad-owner-or-permissions-error-using-cygwins-ssh-exe. docker-machine is working for me right now.

@vblackburn
Copy link

I have the same error though when trying

docker-machine rm default

it just got stuck and never gave any output, so I went ahead and removed the default folder manually. Though when trying to run

docker-machine create -d virtualbox default

It got stuck on creating shh again, this was the output;

Running pre-create checks...
Creating machine...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
Error creating machine: Error in driver during machine creation: /usr/local/bin/VBoxManage modifyvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 1024 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 off --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd failed:
VBoxManage: error: The machine 'default' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

The default folder is created though it still has the same SSH error. I've tried uninstalling and reinstalling the docker toolbox multiple times and nothing is changing, any suggestions???

@tomphp
Copy link

tomphp commented Dec 9, 2015

Also getting the same issue here (El Capitan)

@nasserahmed
Copy link

OSX: v10.11.2 (El Capitan)
Virtualbox: 5.0.10r104061
Docker version 1.9.1, build a34a1d5

The following worked for me:
docker/machine#1801 (comment)

@udoless
Copy link

udoless commented Dec 10, 2015

Also getting the same issue here

@tomphp
Copy link

tomphp commented Dec 11, 2015

+1 for @nasserahmed's link - deleting all the Host-only networks from virtual box fixed it.

@skyer9
Copy link

skyer9 commented Dec 14, 2015

+1 deleting all image from virtual box fixed it.

@stevelr
Copy link

stevelr commented Dec 15, 2015

I have a work-around that I've been using for a few weeks - all the regular "docker" commands work from my terminal, and I never use docker-machine anymore. To ssh into the vm, I use the docker-ssh alias defined below.

[updated, added DOCKER_HOST to file below]

Put the following lines into a script in ~/bin/docker-setup. In my ~/.bashrc I source it with the command ". $HOME/bin/docker-setup" . You need to get the host ip address [ with the NAT networking, this may be 192.168.99.100. If you use Bridged networking on network interface 0, this is an IP address on your LAN on eth0 interface]. In the vm console window type "ifconfig | less" to see the network interfaces. (press Show on the Virtualbox UI if the console window is not visible). This is the only thing I ever need to do in that window. After this setup, you can just type "docker-ssh" to ssh into the boot2docker vm from your regular Terminal or iTerm window.

#
# source this
#

# Set this IP addr to the location of the docker host
# (For bridged networking, this is the LAN address on eth0)
export DOCKER_IP=10.100.1.114
export DOCKER_HOST=tcp://${DOCKER_IP}:2376
export DOCKER_DEF="$HOME/.docker/machine/machines/default"
export DOCKER_ARGS="--tls=true --tlscacert=$DOCKER_DEF/ca.pem --tlscert=$DOCKER_DEF/cert.pem --tlskey=$DOCKER_DEF/key.pem"
alias docker-ssh="ssh -i ~/.docker/machine/machines/default/id_rsa docker@$DOCKER_IP"
alias docker-scp="scp -i ~/.docker/machine/machines/default/id_rsa docker@$DOCKER_IP"
alias docker="docker $DOCKER_ARGS"

With this setup, you can use any docker command "docker ps", "docker build" ,etc. If you use shell scripts (build.sh, or Makefile, etc.) to construct docker images, don't forget to include ${DOCKER_ARGS} on the command line in the script file. For example,

    #!/bin/sh
    docker ${DOCKER_ARGS} build -t myimage .

Bonus tip:
If you want to set up port forwarding between the VM and your desktop, you can use standard ssh port forwarding. To do this you need to know the docker machine's host ip address, which you can get with
"ifconfig docker0". I run an http server on my mac on port 7770 that I want to make available to all docker containers, so I use the -R reverse port forwarding flag as follows (add these lines to ~/bin/docker-setup).

export DOCKER_BRIDGE_HOST_IP=172.17.0.1
alias docker-ports="ssh -f -N -g -R $DOCKER_BRIDGE_HOST_IP:7770:localhost:7770 -i ~/.docker/machine/machines/default/id_rsa docker@$DOCKER_IP"

To start port forwarding, type "docker-ports" in a terminal window. After executing this command, docker containers can access the server at http://$DOCKER_BRIDGE_HOST_IP:7770.When setting up remote port forwarding that binds to a specific IP address, you have to enable GatewayPorts in sshd_config. In /etc/ssh/ssh_config (or /usr/local/etc/ssh/sshd_config), add the line

    GatewayPorts yes

@iongion
Copy link

iongion commented Dec 16, 2015

On windows 10 - using windows command prompt shell
Virtualbox: 5.0.10-r104061

docker-machine -v
docker-machine version 0.5.3, build 4d39a66
docker-machine rm default
Do you really want to remove "default"? (y/n): y
(default) Stopping VM...
Successfully removed default

Re-creating the machine

docker-machine create --driver virtualbox default
Running pre-create checks...
Creating machine...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting VM...
Error creating machine: Error in driver during machine creation: Maximum number of retries (5) exceeded

Although I see the machine running in Virtualbox Preview UI rectangle in the upper-right corner of the window.

Then the logs:

(default) DBG | Using SSH client type: external
(default) DBG | About to run SSH command:
(default) DBG | ip addr show dev eth1
(default) DBG | SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
(default) DBG |     link/ether 08:00:27:1b:17:3b brd ff:ff:ff:ff:ff:ff
(default) DBG |     inet6 fe80::a00:27ff:fe1b:173b/64 scope link
(default) DBG |        valid_lft forever preferred_lft forever
(default) DBG |
(default) DBG | SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
(default) DBG |     link/ether 08:00:27:1b:17:3b brd ff:ff:ff:ff:ff:ff
(default) DBG |     inet6 fe80::a00:27ff:fe1b:173b/64 scope link
(default) DBG |        valid_lft forever preferred_lft forever
(default) DBG |
(default) DBG | END SSH
(default) DBG |
(default) DBG | ERROR getting IP: No IP address found 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
(default) DBG |     link/ether 08:00:27:1b:17:3b brd ff:ff:ff:ff:ff:ff
(default) DBG |     inet6 fe80::a00:27ff:fe1b:173b/64 scope link
(default) DBG |        valid_lft forever preferred_lft forever

What should I investigate more ?

@danpospisil
Copy link

I have exactly the same issue with the same behavior as iongion has

@iongion
Copy link

iongion commented Dec 16, 2015

A bit more info here:
http://superuser.com/questions/1002160/failed-to-start-virtual-device-in-oracle-virtual-box/1002243#1002243

I've tried it with:

docker-machine --debug create --driver virtualbox --virtualbox-hostonly-cidr "192.168.100.100/24" --virtualbox-memory 1024 default

And the last debug log entries:

...
...
(default) DBG | using 192.168.100.12 for dhcp address
(default) DBG | COMMAND: C:\Applications\VirtualBox\VBoxManage.exe list hostonlyifs
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | Name:            VirtualBox Host-Only Ethernet Adapter #2
(default) DBG | GUID:            ad93f87f-9523-45e3-8537-ee83d7c685df
(default) DBG | DHCP:            Disabled
(default) DBG | IPAddress:       192.168.56.1
(default) DBG | NetworkMask:     255.255.255.0
(default) DBG | IPV6Address:     fe80:0000:0000:0000:b162:757f:086a:3ae6
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType:      Ethernet
(default) DBG | Status:          Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
(default) DBG |
(default) DBG | Name:            VirtualBox Host-Only Ethernet Adapter #3
(default) DBG | GUID:            15b8f07a-cdf9-4677-8b95-f33d046fcd08
(default) DBG | DHCP:            Disabled
(default) DBG | IPAddress:       192.168.100.100
(default) DBG | NetworkMask:     15.0.0.0
(default) DBG | IPV6Address:     fe80:0000:0000:0000:5597:16f4:4294:95f4
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType:      Ethernet
(default) DBG | Status:          Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3
(default) DBG |
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | COMMAND: C:\Applications\VirtualBox\VBoxManage.exe modifyvm default --nic2 hostonly --nictype2 82540EM --nicpromisc2 deny --hostonlyadapter2 VirtualBox Host-Only Ethernet Adapter #3 --cableconnected2 on
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | COMMAND: C:\Applications\VirtualBox\VBoxManage.exe modifyvm default --natpf1 delete ssh
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | VBoxManage.exe: error: Code E_INVALIDARG (0x80070057) - One or more arguments are invalid (extended info not available)
(default) DBG | VBoxManage.exe: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1767 of file VBoxManageModifyVM.cpp
(default) DBG | }
(default) DBG | COMMAND: C:\Applications\VirtualBox\VBoxManage.exe modifyvm default --natpf1 ssh,tcp,127.0.0.1,51126,,22
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | COMMAND: C:\Applications\VirtualBox\VBoxManage.exe startvm default --type headless
(default) DBG | STDOUT:
(default) DBG | {
Opting out of crash reporting.
Error creating machine: Error in driver during machine creation: exit status 1

So from it, a few errors:

(default) DBG | VBoxManage.exe: error: Code E_INVALIDARG (0x80070057) - One or more arguments are invalid (extended info not available)
(default) DBG | VBoxManage.exe: error: Context: "RemoveRedirect(Bstr(ValueUnion.psz).raw())" at line 1767 of file VBoxManageModifyVM.cpp

Did not find any crash report.
Even with this error, I have forced:

docker-machine restart default
exit status 1

And it does restart the machine, although command finishes with an error again.
I then manually went to Virtualbox to start it by hand:

Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3' (VERR_INTNET_FLT_IF_NOT_FOUND).
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND).

This is solved by changing your adapter properties and enabling "VirtualBox NDIS6 Bridged Networking Driver" (if not enabled) in your virtualbox network adapters.

Now, I am able to restart (no more exit status 1)

 docker-machine restart default
(default) Starting VM...
Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

Now docker-compose build is still not able to work as no connection can be established :(.
The docker-build still has no environment in windows batch files so it cannot know where to connect.
For this, I run docker-machine env and what do you know, another error:

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.100.100:2376": open C:\Users\worker\.docker\machine\machines\default\server.pem: The system cannot find the file specified.
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

Ok, I try what it says:

$ docker-machine regenerate-certs default
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...

This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.

SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.

You may need to add the route manually, or use another related workaround.

This could be due to a VPN, proxy, or host file configuration issue.

You also might want to clear any VirtualBox host only interfaces you are not using.

Ok, so now it is a port issue, let's check the IP address of the default machine, I go to virtualbox and click show, then ifconfig, shows two interfaces, which is expected:

One is 10.0.2.15 (this is NAT network)
The other is 192.168.100.100 - this is part of the host only network that we defined when creating the network.

Let's now see if the host machine running virtualbox (a windows box) can see the last address:

ping 192.168.100.100
Pinging 192.168.100.100 with 32 bytes of data:
Reply from 192.168.100.100: bytes=32 time<1ms TTL=128
Reply from 192.168.100.100: bytes=32 time<1ms TTL=128

It does, let's telnet to know if the docker daemon find the port open for 2376:

$ telnet 192.168.100.100 2376
Connecting To 192.168.100.100...Could not open connection to the host, on port 2376: Connect failed

22 does not work either, so it is not opened or not running, let's eliminate one of them, back to virtualbox gui and into the default machine screen, on bash:

netstat -atn
::22
::2376

I see both ports are opened, telnet on the machine itself(in the default vm):

  • telnet localhost 22 responds
  • telnet localhost 2376 does not respond

Telnet from the host machine:

telnet 192.168.100.100 22
Connecting To 192.168.100.100...Could not open connection to the host, on port 22: Connect failed
telnet 192.168.100.100 2376
Connecting To 192.168.100.100...Could not open connection to the host, on port 2376: Connect failed

Ok, then there might be something in between, virtualbox network settings, let's see how port mapping works in this case.
I investigate the network settings, nothing seems bad, I see one port mapping for the NAT network not for the host only, and that mapping maps 22 to a local port(local to the windows machine - host)

Restart for the sake of restarting:

$ docker-machine stop default
$ docker-machine start default
$ docker-machine env default
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.100.100:2376": dial tcp 192.168.100.100:2376: connectex: No connection could be made because the target machine actively refused it.
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

Again regenerate ?

I stop here cause I have no clue what to do next, it seems that either the services are not running on this boot2docker default image or that there is a firewall or something in between that does blocks/prevents access to those ports.

@iongion
Copy link

iongion commented Dec 16, 2015

Managed to make it be able to execute docker-machine env default, which in turn throws up this:

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.100.100:2376"
export DOCKER_CERT_PATH="C:\Users\worker\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval "$(w:\SDKs\DockerToolbox\docker-machine.exe env default)"

image

Apparently adding that port mapping additional rule made it work.
The one for ssh is reset by docker-machine whenever you restart the default vm.
I do not know why docker-machine transfers all incomming localhost trafic to port 22 to the docker vm. Should'nt it transfer only the traffic to that specific machine only, so, instead of mapping my local ssh port, I map only that of 192.168.100.100, which coresponds to the address of the default vm ?

Now docker-compose is not running.

$ docker-compose --verbose build
compose.config.config.find: Using configuration files: .\docker-compose.yml
docker.auth.auth.load_config: Trying c:/Users/worker\.docker\config.json
docker.auth.auth.load_config: File doesn't exist
docker.auth.auth.load_config: Trying c:/Users/worker\.dockercfg
docker.auth.auth.load_config: File doesn't exist - returning empty config
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "C:\projects\compose\compose\cli\main.py", line 54, in main
  File "C:\projects\compose\compose\cli\docopt_command.py", line 23, in sys_dispatch
  File "C:\projects\compose\compose\cli\docopt_command.py", line 26, in dispatch
  File "C:\projects\compose\compose\cli\main.py", line 169, in perform_command
  File "C:\projects\compose\compose\cli\command.py", line 53, in project_from_options
  File "C:\projects\compose\compose\cli\command.py", line 89, in get_project
  File "C:\projects\compose\compose\cli\command.py", line 72, in get_client
  File "c:\projects\compose\venv\lib\site-packages\docker\api\daemon.py", line 78, in version
  File "c:\projects\compose\venv\lib\site-packages\docker\client.py", line 110, in _get
  File "c:\projects\compose\venv\lib\site-packages\requests\sessions.py", line 477, in get
  File "c:\projects\compose\venv\lib\site-packages\requests\sessions.py", line 465, in request
  File "c:\projects\compose\venv\lib\site-packages\requests\sessions.py", line 573, in send
  File "c:\projects\compose\venv\lib\site-packages\requests\adapters.py", line 415, in send
requests.exceptions.ConnectionError: ('Connection aborted.', error(10061, 'No connection could be made because the target machine actively refused it'))
docker-compose returned -1

This because on windows, and on windows I cannot:
eval "$(w:\SDKs\DockerToolbox\docker-machine.exe env default)"

Yes, I could take the env vars and export them myself in a windows compatible way, but I am too lazy. As there is no eval, I trick this by firing a POSIX shell using msys and loading the env.

$ docker-compose --verbose build
compose.config.config.find: Using configuration files: .\docker-compose.yml
docker.auth.auth.load_config: Trying c:/Users/worker\.docker\config.json
docker.auth.auth.load_config: File doesn't exist
docker.auth.auth.load_config: Trying c:/Users/worker\.dockercfg
docker.auth.auth.load_config: File doesn't exist - returning empty config
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "C:\projects\compose\compose\cli\main.py", line 54, in main
  File "C:\projects\compose\compose\cli\docopt_command.py", line 23, in sys_dispatch
  File "C:\projects\compose\compose\cli\docopt_command.py", line 26, in dispatch
  File "C:\projects\compose\compose\cli\main.py", line 169, in perform_command
  File "C:\projects\compose\compose\cli\command.py", line 53, in project_from_options
  File "C:\projects\compose\compose\cli\command.py", line 89, in get_project
  File "C:\projects\compose\compose\cli\command.py", line 72, in get_client
  File "c:\projects\compose\venv\lib\site-packages\docker\api\daemon.py", line 78, in version
  File "c:\projects\compose\venv\lib\site-packages\docker\client.py", line 110, in _get
  File "c:\projects\compose\venv\lib\site-packages\requests\sessions.py", line 477, in get
  File "c:\projects\compose\venv\lib\site-packages\requests\sessions.py", line 465, in request
  File "c:\projects\compose\venv\lib\site-packages\requests\sessions.py", line 573, in send
  File "c:\projects\compose\venv\lib\site-packages\requests\adapters.py", line 431, in send
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
docker-compose returned -1

And back to square 0 - the infamous SSL error

Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.2d 9 Jul 2015'

But this is SSL of python and from what I remember docker-compose is not python anymore.

@danpospisil
Copy link

Today I got some update from Microsoft installed and Docker started working ... so try to install latest updates for Windows 10 - might work for you as well :)

(PS: I had to recreate the default VM)

@itayB
Copy link

itayB commented Dec 21, 2015

Same issue append to me.
Windows7, VirtualBix 5.0.10

I changed the name of the default VM to default1 (in Oracle VM VirtualBox Manager GUI), and start Docker Quickstart Terminal again (with Run as administrator), Worked!

@baoming
Copy link

baoming commented Dec 24, 2015

update 1.9.1f.exe ALL runs well.

@itayB
Copy link

itayB commented Dec 27, 2015

Update: running 'Docker Quickstart Terminal' with 'Run as administrator' solved the problem for me (Windows7)

@amasson88
Copy link

I cannot start "Docker Quickstart Terminal" or Kitematic (toolbox 1.9.1f), I have this error on Windows 8.1:
00:00:45.613089 VMMDev: Guest Log: 00:00:10.011751 vminfo Error: Unable to connect to system D-Bus (3/3): D-Bus not installed
(is it related to #214 ?)

Update: I deleted "host-only" network interfaces in global VirtualBox config (see docker/machine#1801 (comment)) and that fixed the problem.

@zhentaoo
Copy link

zhentaoo commented Jan 8, 2016

@bojanstef
thank you!
$ docker-machine rm default
$ docker-machine create --driver virtualbox default

@sahas-
Copy link

sahas- commented Jan 11, 2016

Its OS X EI Capitan.
Remove and recreate default didn't work.
Getting "Error creating machine: Error in driver during machine creation: Maximum number of retries (5) exceeded"
screen shot 2016-01-10 at 8 53 50 pm

Sticking with boot2docker for now, its working well on the same box..

@eh1160
Copy link

eh1160 commented Jan 12, 2016

I tried almost all the solutions and none of them worked. But it works now and I'm pretty sure chmod on the ssh config ultimately fixed it.

chmod 600 /Users/<me>/.ssh/config

OS X El Capitan v10.11.2
Docker version 1.9.1h

@will-parsons
Copy link

OSX El Capitan. If it helps anyone, I had two obstacles:

  1. I was connected to a VPN - my employer (rightly) restricts SSH and other connectivity around the network.
  2. By default I proxy all SSH connections (another security measure), and these scripts are using SSH to connect to the 'default' VM.

After disconnecting VPN, and setting my ~/.ssh/config back to "normal", everything worked as intended. Figuring out how to run this all seamlessly is my problem :) - might just use an independent VM or Cloud Server for development instead.

@TimoSolo
Copy link

TimoSolo commented Apr 5, 2016

Did the docker-machine rm default thing a couple times, but takes ages to download image.

Found a simpler solution though! Open VirtualBox, turn off the "default" machine. Run Docker Quickstart and it starts up the VM and connects fine!

@syzer
Copy link

syzer commented Apr 14, 2016

+1

@chineshboy
Copy link

I have met the same problem, on OSX EI Capitan. I just restarted my Mac and then it became fine.
So I think it is something wrong with VirtualBox, @TimoSolo 's answer might be a very good way.

@Fernando9
Copy link

I was having the same problem. Thank you @drewlamur changing the permissions on my ssh folder helped me with the issue for know. I hope that can give a better work around for this issue.

@iver3on
Copy link

iver3on commented Jun 20, 2016

$ docker-machine rm default
$ docker-machine create --driver virtualbox default

I just do like that. but it appear another fault:

``$ docker-machine create --driver virtualbox default
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\31639.docker\machine\cache\boot2docker.iso to C:\Users\31639.docker\machine\machines\defaul
t\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Waiting for an IP...

who can help me ?
windows 10 and docker 1.11

@Somebi
Copy link

Somebi commented Jun 22, 2016

In my case, problem was in low virtual memory. 256mb is not enough. Increasing it to 512mb have helped. There should be some error handling about out of memory or something like that at boot/loading time.

@Somebi
Copy link

Somebi commented Jun 22, 2016

See logs in virtualbox directly. If it stuck, it will show at which point it does.

@harzbecher
Copy link

Same issue for me (Windows OS), in my case I solved it by opening virtualBox and resetting (Ctrl+T) "default" machine, then I opened 'Docker Quickstart Terminal Again' (It thrown the same error the first time) and ran docker-machine ls
image

@iver3on
Copy link

iver3on commented Aug 3, 2016

i see.

@dgoutam
Copy link

dgoutam commented Sep 30, 2016

OS X El Capitan
Docker version 1.12.0

docker-machine rm default works for me

@Avec112
Copy link

Avec112 commented Oct 1, 2016

OS X El Capitan
Docker version 1.12.1

I also had to run this after the ssh failed.

docker-machine rm default
docker-machine create --driver virtualbox default

However.

  1. I had Docker Toolbox earlier and installed Docker for Mac later. It worked like a charm.
  2. Today I cleaned my mac for all docker and boot2docker related stuff and started over
  3. As it seems to me, this problem occurs when installing Docker for mac without having boot2docker (or other needed files) in place from earlier.

@Giriraj24
Copy link

@iver3on , Were you able to find solution to your problem?

I am also facing the same issue?

See below:

$ docker-machine rm default
About to remove default
Are you sure? (y/n): y
Error removing host "default": Host does not exist: "default"

$ docker-machine create --virtualbox-no-vtx-check --driver virtualbox default
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\girirajgujar.docker\machine\cache\boot2docker.iso to C:\Users\girirajgujar.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Waiting for an IP.......

It just get stuck there and nothing happens? Any idea?

Any idea?

I am using Win10 and Docker version 1.12

@RaazTripathi
Copy link

create a port forwarding for 57760 to 22 and it will solve problem

@webguywalker
Copy link

webguywalker commented Jan 26, 2017

Recreating the virtual machines seem to be pretty extreme, lol
I've noticed from time to time docker-machine will lose the state of the virtual box vm.
Suspecting this is networking specifically with OSX/VirtualBox

What I usually run:

// disconnect Lan & get on wifi
virtualbox // Power-Off Machines
docker-machine stop {{name}}
docker-machine start {{name}}
eval $(docker-machine env {{name}})

Specs:

El Capitan 10.11.6
Docker version 1.13.0
docker-machine version 0.9.0
VirtualBox Version 5.0.28

Maybe Related:

@doArcanjo
Copy link

Just one more possible solution:

Check "VBoxHardening.log" if it mentions "LavasoftTcpService.exe":

  • Unistall Ad-Aware (lavasoft);

Source:
docker/kitematic#2076 (comment)

@konkeong
Copy link

Encountered same problem.
Cannot find the IP address.
Follow the steps here and fix the problem.

Windows 7 Enterprise 64-bit
Oracle VM VirtualBox 5.1.20.r114628 (64bit) (VirtualBox-5.1.20-114628-Win.exe)
Docker Toolbox (DockerToolbox-17.05.0-ce-rc1.exe)

https://forum.adaware.com/index.php?/topic/34376-solution-for-lavasofttcpservice-problem-after-uninstallation/

  1. Please, start Command Prompt as an administrator by right-clicking it and select Run as administrator.

  2. Enter this command to reset the network adapter (end with the Enter key):
    netsh winsock reset

  3. Restart the computer.

  4. Please, delete these two files:
    C:\WINDOWS\system32\LavasoftTcpService64.dll
    C:\WINDOWS\system32\LavasoftTcpServiceOff.ini
    C:\WINDOWS\SysWOW64\LavasoftTcpService.dll (only for 64-bit Windows)
    C:\WINDOWS\SysWOW64\LavasoftTcpServiceOff.ini

@kapalesachin
Copy link

This is most of the time issue because of firewall or VPN connectivity. I would suggest to create VM after you disconnect from VPN.

@ssg1205
Copy link

ssg1205 commented Oct 3, 2017

Before you try the below steps -

docker-machine rm default
docker-machine create --driver virtualbox default

Removing the "default" machine removes all the images which are associated with it. It may be a quick fix but definitely not worth it for people who are working on images already part of their "default" machine.

Please try resetting the "default" machine in VirtualBox by going to Machine-->Reset.

image

@JanVanIm
Copy link

JanVanIm commented Dec 31, 2018

When I try to delete the default VM in the Virtual Box, I cannot as the option Delete is greyed when I right-click on it. How can I delete the default VM ?

@JanVanIm
Copy link

Finally the Delete option was available

@JaredLLewis
Copy link

I don't know why this worked (I'm new to docker), but removing the default vm and then reloading the quickstart terminal (creates a new default vm) worked for me.

You don't need to remove the vm in my experience. Simply powering it off and turning it back on will work. It appears restarting your machine without shutting town the oracle vm will cause this issue.

@ShreyaSC05
Copy link

I'm also experiencing this error and have the same results, running 'docker-machine rm default' and then firing up the quickstart terminal worked for me - but I also don't know why…

@purplezimmermann
Copy link

Hi. Maybe something similar to #887 (comment) is happening at least on other Windows machines, too... Essentially a conflict of different SSH clients being used by Docker in different shell environments or after some new software installation with bundled OpenSSH

@Saswat956
Copy link

Hi all
I downloaded docker-machine from https://www.docker.com/docker-toolbox and installed on my mac os x el captain version 10.11. I followed the tutorials on the site and it worked fine.
Then today I start my computer and want to download mysql from docker hub.
I start Docker Quickstart Terminal and on the console, then it shows to me:

Machine default already exists in VirtualBox. 
Setting environment variables for machine default...
                    ##         .
              ## ## ##        ==
           ## ## ## ## ##    ===
       /"""""""""""""""""\___/ ===
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
       \______ o           __/
         \    \         __/
          \____\_______/
Error getting IP address: Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output : 
docker is configured to use the default machine with IP For help getting started, check out the docs at https://docs.docker.com 

Error running connection boilerplate: Error getting driver URL: Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output :

What do am I doing wrong?
Thanks

Hi,Do you got any soln for this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests