Kitematic: 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.

Created on 8 Nov 2015  路  27Comments  路  Source: docker/kitematic

Most helpful comment

sudo ifconfig vboxnet0 down && sudo ifconfig vboxnet0 up is the easies fix at this point.

All 27 comments

@sauarum Thanks Can you provide logs?

Closing for now. Please reply with logs and I'll open this up!

Thanks

Hello, i'm having the exact same issue. I have a plethora of details and logs, but i don't know where to begin or what you want. Basically, i no longer can access my docker vm in OSX via docker-machine env . It suggests I run docker-machine regenerate-certs . The full response is:

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 :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.

I uninstalled and reinstalled virtual box with the latest version 5.0.12. Installed docker toolbox 1.9.1.f on top of the current installation. I rebooted. I deleted my VM and recreated via docker-machine rm -f, docker-machine create --driver virtualbox. I also tried docker-machine --native-ssh create --driver virtualbox. I still am unable to connect directly after the VM is created.

Also, the docker-machine create command will exit with timeout, so it never completes. Here is the response:

docker-machine action: Install Docker CoreOS VM_NAME octobox-dev
docker-machine create --driver virtualbox octobox-dev
Running pre-create checks...
Creating machine...
(octobox-dev) Creating VirtualBox VM...
(octobox-dev) Creating SSH key...
(octobox-dev) Starting VM...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
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 :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.
Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There > was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o > timeout
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.

I am at my wits end. Please help! Thank you!

I got the similar issue after putting my mac into sleep. And I am able to fix it by following the suggestions from https://github.com/docker/machine/issues/2136.

Basically, I removed all host only interfaces from my virtualbox (VirtualBox => Preferences => Network => Host-only networks), then delete ~/.docker/ folder and exit virtualbox.

After that, I am able to successfully create and connect to the 'default' docker machine again.

Having the same issue, but @xu-dan's solution isn't working for me. Went through all the steps and restarted several times, but still no dice.

Running OSX 10.10.2, Docker 1.9.1.i and VirtualBox 5.0.4

i'm seeing this same issue, as well. it seems to have started when my Mac lost power and forced a shutdown. since rebooting, can't get anything to work..

I have the same issue on Windows 10 after it went to sleep. @xu-dan's solution did not work for me either.

I have the same issue, same scenario as @joshlong . Mac lost power, then on reboot docker is unable to communicate with vbox.

Have tried removing and recreating the default machine with no luck, here is the log:

Running pre-create checks...
Creating machine...
(default) Copying /Users/stevewilliams/.docker/machine/cache/boot2docker.iso to /Users/stevewilliams/.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...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
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 :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.
Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o timeout
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.

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o timeout
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.

+1

OSX slept, docker yields this when I try to run Quickstart:

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

Tried removing docker entirely and reinstalling, but still having issues. Lost some images I was working on too.

+1.

docker-machine version 0.6.0, build e27fb87
Virtualbox Version 5.0.16 r105871

$ docker-machine create -d virtualbox development
Running pre-create checks...
Creating machine...
(development) Copying /Users/martinm8/.docker/machine/cache/boot2docker.iso to /Users/martinm8/.docker/machine/machines/development/boot2docker.iso...
(development) Creating VirtualBox VM...
(development) Creating SSH key...
(development) Starting the VM...
(development) Check network to re-create if needed...
(development) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
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.
Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.102:2376": dial tcp 192.168.99.102:2376: i/o timeout
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.

sudo ifconfig vboxnet0 down && sudo ifconfig vboxnet0 up is the easies fix at this point.

@piotrgiedziun Didn't work for me.
Still:
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.101:2376": dial tcp 192.168.99.101:2376: i/o timeout,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.,,notifying bugsnag: [Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.101:2376": dial tcp 192.168.99.101:2376: i/o timeout,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.,],

and regenerating says:

docker-machine regenerate-certs default
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
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 :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.

@ecamaj Try to upgrade docker-machine to the latest version https://github.com/docker/machine/releases. It solved the problem in my case (I don't have to restart interface any more). In notes they mentioned "More robust host-only interface collision detection".

@ecamaj
I'm on docker-machine version 0.7.0, build a650a40 and running into issue. I did this to get it working.

vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:00
vboxnet1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:01
vboxnet2: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:02
vboxnet3: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:03
vboxnet4: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:04
vboxnet5: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:05
vboxnet6: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:06
vboxnet7: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:07
vboxnet8: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:08
    inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255

I then went into the virtual box gui and looked at the vm host I wanted to fix and noticed that under networking adapter 2 that vboxnet8 was the value in the Name drop down.

I ran this(replace 8 with what you found when looking in the gui.
sudo ifconfig vboxnet8 down && sudo ifconfig vboxnet8
docker-machine env <your-name-here>
now when I do a docker-machine ls my host is running and working correctly. This is not ideal, but at least I don't have to keep losing my host and creating a new one 10 times a day. Hopefully this is helpful to someone else too.

@piotrgiedziun That helped. For now, we'll see for how long
@GoatWalker Thanks, but less "hacking" version was the first choice. :) Will have your in mind for future reference.

This is really annonying.
Latest docker on Mac, after few runs it gets the same as before.

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.
Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o timeout

ifconfig:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 ::1 prefixlen 128 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:b0:47:a3 
    inet6 fe80::aebc:32ff:feb0:47a3%en0 prefixlen 64 scopeid 0x4 
    inet 192.168.0.105 netmask 0xffffff00 broadcast 192.168.0.255
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 4a:00:03:aa:f1:b0 
    media: autoselect <full-duplex>
    status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 4a:00:03:aa:f1:b1 
    media: autoselect <full-duplex>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 0e:bc:32:b0:47:a3 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether 9a:54:d8:14:1f:32 
    inet6 fe80::9854:d8ff:fe14:1f32%awdl0 prefixlen 64 scopeid 0x8 
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether ae:bc:32:0b:d7:00 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 5 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    nd6 options=1<PERFORMNUD>
    media: <unknown type>
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
    inet6 fe80::49c4:3beb:9d62:3b12%utun0 prefixlen 64 scopeid 0xa 
    inet6 fdec:63fe:1a21:56c2:49c4:3beb:9d62:3b12 prefixlen 64 
    nd6 options=1<PERFORMNUD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
    inet6 fe80::4677:da5a:d6b2:479e%utun1 prefixlen 64 scopeid 0xb 
    nd6 options=1<PERFORMNUD>
utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
    inet6 fe80::4625:d0bd:c85a:7d6e%utun3 prefixlen 64 scopeid 0xd 
    nd6 options=1<PERFORMNUD>
utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1350
    inet 10.1.40.19 --> 10.1.40.18 netmask 0xffffff00 
vboxnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:00 
    inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255

I managed to get past this issue chaining together many of the suggestions above (OS X 10.10, Docker 1.11.2, docker-machine 0.7.0, & vbox 5.0.20). The machine is new and the docker packages were a fresh install.
This seems to be the simplest test that it is broken:
$ docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

So, I did this:
$ docker-machine regenerate-certs

And then this:
$ sudo ifconfig vboxnet8 down && sudo ifconfig vboxnet8

And then this:
$ eval "$(docker-machine env default)"

And finally got this:
$ docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0... yada yada yada

Then all the other docker daemon and TLS related errors appear to have gone away (and Kitematic is working now too).

Hi, in virtualbox go to Preferences -> Network -> Host-only Network and remove all adapters listed.
and follow the steps from this troubleshooting page https://docs.docker.com/toolbox/faqs/troubleshoot/
Worked for me. hope it helps!

docker-machine version 0.6.0, build e27fb87
Docker version 1.10.3, build 20f81dd

This is what I did :

  • Virtualbox > Preferences -> Network -> Host-only Network and remove all adapters listed.
  • docker-machine rm default
  • docker-machine create --driver virtualbox default
  • eval "$(docker-machine env default)"
  • 馃憤

Good work @jeevanjoseph .. His solution works for me.

I found that removing the host-only adapter vboxnet0 the error is removed, If I want to run docker-machine create again, the error appears again. How can I fix that?

I don't want to remove the host-only adapter in every creation.

@jeevanjoseph Thanks is working for me, also I have to update my virtual box to Version 5.1.8 r111374 (Qt5.5.1) in order to create the default machine correctly , I am using windows 10 and Docker Toolbox 1.12.2.

Same issue here on:
Ubuntu 17.04
docker-machine version 0.10.0, build 76ed2a6
virtualbox Version 5.1.18_Ubuntu r114002

None of the solutions above work.

Same issue here:

$ uname -a
Linux hostname 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:07:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ docker-machine -v
docker-machine version 0.12.2, build 9371605



md5-d607f389f89dce13f55cca0e81e4b0cc



$ VBoxManage -v
5.1.24r117012

Running sudo ifconfig vboxnet0 up will fix this, but after restarting the system this problem persists.

Edit: It seems there is a bug in VirtualBox 5.1.24 that prevents setting vboxnetX up.

Edit 2: VirtualBox 5.1.26 has been released, fixed!

Here is what I did to solve the issue.

  1. Closed the Kitematic. Opened the VirtualBox, shutdown the VM(boot2Docker) which was running.
  2. Then I ran the command in terminal docker-machine restart
  3. Check with docker-machine env
  4. Then opened the Kitematic without any error.

I'm on a Mac. Here is what I did to solve the issue.

  1. Disconnected my VPN (after an hour of frustration)

I have been struggling with this, and I didn't want to lose my existing default machine, as I had a number of containers already configured. But finally I found the solution:
Remove all unused Host-Only adapters from the virtual box. I had 5 of them, and they were all spawning a new VBoxNetDHCP.exe (Windows Task Manager). Once I removed these, and restarted the vbox, and docker shell, and with these two commands, everything was good again
$ docker-machine restart default # Restart the environment
$ eval $(docker-machine env default) # Refresh your environment settings

@sfreemire you saved my day!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noahgift picture noahgift  路  3Comments

jwschram picture jwschram  路  4Comments

cnBruceHong picture cnBruceHong  路  4Comments

geoffroy-noel-ddh picture geoffroy-noel-ddh  路  3Comments

louia picture louia  路  3Comments