As the doctor gone rogue

January 22, 2017

docker-machine connection error

Filed under: SysAdmin — hypotheses @ 6:47 pm

Life is not that simple. Even after I figured out how to create a docker machine to limit the disk usage, cpu, and memory through docker-machine running on Ubuntu host. However, there seems to be a problem that prevent the host to connect directly to the guest docker-machine.


bhoom@mg0:~$ docker-machine create -d virtualbox --virtualbox-disk-size "100000" --virtualbox-memory "32000" --virtualbox-cpu-count "16" fireDock0
Running pre-create checks...
Creating machine...
(fireDock0) Copying /home/bhoom/.docker/machine/cache/boot2docker.iso to /home/bhoom/.docker/machine/machines/fireDock0/boot2docker.iso...
(fireDock0) Creating VirtualBox VM...
(fireDock0) Creating SSH key...
(fireDock0) Starting the VM...
(fireDock0) Check network to re-create if needed...
(fireDock0) 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.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.

If this is your case, and you have proxy server setup for your general internet connection, try


export http_proxy=""

if you are lucky, you should be able to connect to your docker-machine (locally). Otherwise, life is not that simple.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: