Docker Community Forums

Share and learn in the Docker community.

Unreachable docker daemon using TCP

Hi,

I have a docker daemon running on a machine A using a TCP socket :

dockerd -H tcp://0.0.0.0:2375 -l debug

When I try to interact with it on machine A, it works, e.g.:

docker -H tcp://X.X.X.X:2375 info

But if I try to do the same thing from machine B (!= A), I get something like:

Cannot connect to the Docker daemon at tcp://X.X.X.X:2375. Is the docker daemon running?

I have another docker daemon running on a unix socket on machine B, can this be an issue (if I specify -H)? Any idea how I can investigate this any further?

Here are some quick solutions to help get back on track. These examples assume the Docker host is a machine called default.

REGENERATE CERTIFICATES
Some errors explicitly tell you to regenerate certificates. You might also try this for other errors that are certificate and/or connectivity related.

docker-machine regenerate-certs default Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y Regenerating TLS certificates RESTART THE DOCKER HOST docker-machine restart default
After the machine starts, set the environment variables for the command window.

eval (docker-machine env default)
Run docker-machine ls to verify that the machine is running and that this command window is configured to talk to it, as indicated by an asterisk for the active machine (*).