Question

How to solve Unable to query docker version: Cannot connect to the docker engine endpoint

Posted June 12, 2020 3k views
DockerUbuntu 18.04

I am using docker-engine to provision a docker-swarm cluster on DO, some days back it was working okay.
Today when I run the same command for creating the servers/nodes and master, it never finishes. it quits with,

Detecting operating system of created instance...
Waiting for SSH to be available...
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded

On running docker-machine ls

NAME   ACTIVE   DRIVER         STATE     URL                         SWARM   DOCKER    ERRORS
dvc1   -        digitalocean   Running   tcp://167.71.166.153:2376           Unknown   Unable to query docker version: Cannot connect to the docker engine endpoint
dvc2   -        digitalocean   Running   tcp://104.248.11.198:2376           Unknown   Unable to query docker version: Cannot connect to the docker engine endpoint
dvc3   -        digitalocean   Running   tcp://167.71.170.118:2376           Unknown   Unable to query docker version: Cannot connect to the docker engine endpoint

Even when I try to regenerate the certs, it never finishes. I didn’t touch anything since it was running before. I have tried using different ubuntu variations but still gets the same problem.

Thanks guys for any suggestions or help.

docker-machine version - 0.16
docker version - 19.03.8
Mac OS catalina 10.15.5
1 comment
  • The same here, can you help me?

    # docker-machine ls
    NAME   ACTIVE   DRIVER         STATE     URL                         SWARM   DOCKER    ERRORS
    t1     -        digitalocean   Running   tcp://104.131.83.135:2376           Unknown   Unable to query docker version: Cannot connect to the docker engine endpoint
    
    edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @kungusamuel90,

It looks like that the SSH connection to your Droplets is not working. I would recommend first checking the status of your Droplets to make sure that they are up and running and if so I would recommend accessing them directly and making sure that the SSH service is running and also checking your server logs to see if there are any errors.

Another thing that you could check is the firewalls on all of your Droplets and make sure that the necessary ports are open.

Let me know how it goes!
Regards,
Bobby

  • Hey Bobby,
    Nothing is working. And they are up and I can even use console to access them. But this is undesired as I want to use docker-machine to configure them automatically.

Submit an Answer