Machine: Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded

Created on 8 Dec 2015  ·  20Comments  ·  Source: docker/machine

It looks ok to create a machine in AWS without a swarm agent, but it fails with one using consul discovery. This is the command to try to create a machine in AWS.

$ docker-machine create --driver amazonec2
--amazonec2-access-key
--amazonec2-secret-key
--amazonec2-session-token
--amazonec2-region
--amazonec2-zone
--amazonec2-vpc-id
--amazonec2-iam-instance-profile
--swarm
--swarm-master
--swarm-discovery="consul://:8500"
--engine-opt="cluster-store=consul://:8500"
--engine-opt="cluster-advertise=eth1:2376"
swarm-master

Running pre-create checks...
Creating machine...
(swarm-master) Launching instance...
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 ubuntu(upstart)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded

areprovision

Most helpful comment

@otiai10 If you try docker-machine provision my-service-machine on the problematic instance?

I think what happened is:

  • machine <0.6.0 created docker configuration file using -d (deprecated) instead of daemon (you can see this flag in the logs)
  • upgrade of docker version went to a new version which doesn't recognize this flag anymore
  • regenerate-certs doesn't replace the config file so the old (faulty) one was still in place

Anyway glad to hear it's working now @otiai10 !

All 20 comments

Is it Machine 0.5.2?

docker-machine version 0.5.2 ( 0456b9f )

We should dump the daemon logs automatically when this type of error occurs.

I don't know if you're already aware of this, but when this happened, I ssh'ed into that machine and checked if the docker was running, but it was not. So I tried to start it, but it didn't seem to be starting at all.

Any update on this?

@AlexOugh Can you please print the output of the Docker daemon logs on the failing system? Most likely sudo journalctl --no-pager -u docker

I have the same issue using AWS driver, token discovery and docker-machine version 0.5.3, build 4d39a66 on ubuntu 15.10 (it was working previously, i provisioned a new machine and now i'm getting the same error.

....
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded

@nathanleclaire
docker-machine version 0.5.4, build 6643d0e, AWS driver (without swarm options)

sudo journalctl --no-pager -u docker:

-- Logs begin at Wed 2016-02-17 19:15:33 UTC, end at Wed 2016-02-17 19:24:28 UTC. --
Feb 17 19:18:40 myenv systemd[1]: Starting Docker Application Container Engine...
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.461744964Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.471206567Z" level=info msg="Firewalld running: false"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.564058457Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.644613154Z" level=warning msg="Your kernel does not support swap memory limit."
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.704391001Z" level=info msg="Loading containers: start."
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.704916743Z" level=info msg="Loading containers: done."
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.705157812Z" level=info msg="Daemon has completed initialization"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.705420949Z" level=info msg="Docker daemon" commit=9e83765 execdriver=native-0.2 graphdriver=aufs version=1.10.1
Feb 17 19:18:40 myenv systemd[1]: Started Docker Application Container Engine.
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.715152635Z" level=info msg="API listen on /var/run/docker.sock"
Feb 17 19:18:44 myenv systemd[1]: Stopping Docker Application Container Engine...
Feb 17 19:18:44 myenv systemd[1]: Stopped Docker Application Container Engine.
Feb 17 19:18:44 myenv docker[20964]: time="2016-02-17T19:18:44.649633528Z" level=info msg="Processing signal 'terminated'"
Feb 17 19:18:53 myenv systemd[1]: Started docker.service.
Feb 17 19:18:53 myenv docker[21611]: flag provided but not defined: -d
Feb 17 19:18:53 myenv docker[21611]: See '/usr/bin/docker --help'.
Feb 17 19:18:53 myenv systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Feb 17 19:18:53 myenv systemd[1]: docker.service: Unit entered failed state.
Feb 17 19:18:53 myenv systemd[1]: docker.service: Failed with result 'exit-code'.
ubuntu@myenv:~$ sudo systemctl status docker.service
● docker.service
   Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2016-02-17 19:41:40 UTC; 2min 38s ago
  Process: 23219 ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=amazonec2 (code=exited, status=125)
 Main PID: 23219 (code=exited, status=125)

Feb 17 19:41:40 myenv systemd[1]: Stopped docker.service.
Feb 17 19:41:40 myenv systemd[1]: Started docker.service.
Feb 17 19:41:40 myenv docker[23219]: flag provided but not defined: -d
Feb 17 19:41:40 myenv docker[23219]: See '/usr/bin/docker --help'.
Feb 17 19:41:40 myenv systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Feb 17 19:41:40 myenv systemd[1]: docker.service: Unit entered failed state.
Feb 17 19:41:40 myenv systemd[1]: docker.service: Failed with result 'exit-code'.
ubuntu@myenv:~$ docker -v
Docker version 1.10.1, build 9e83765

I successfully created another EC2 instance with the same command a few weeks back and it is running Docker version 1.9.1, build a34a1d5.

Thanks -- Try with Machine 0.6.0 and see if it fares any better

Worked with 0.6.0, thanks!

Cool thanks @jbwinters. Going to close this ticket all, please file a new one with information if the issues persist with 0.6.0

Facing similar problem. (machine driver is amazonec2)

% docker-machine regenerate-certs my-machine
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
%

and I found this issue, checked

% docker-machine --version
docker-machine version 0.5.6, build 61388e9

so updated to

% docker-machine --version
docker-machine version 0.6.0, build e27fb87

then tried again, but got the same result.

It is certain the docker API daemon on host is up and listening, because I could get host machine's log below

% docker-machine ssh my-machine
ubuntu@my-machine:~$ sudo docker daemon -D
# ... many logs
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon                                 commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
# ... many logs
INFO[0000] API listen on /var/run/docker.sock

DEBU[0018] Calling GET /v1.22/version
DEBU[0018] GET /v1.22/version
# these two logs were outputted on regenerate-certs

Is this because this machine is --driver amazonec2? or can I do anything?

What worked for me was adding a --amazonec2-ami param and setting it to
aws's Ubuntu 14.04 LTS image: ami-fce3c696 instead of the 15.10 (which
apparently is now default now).
On Thu, Mar 10, 2016 at 3:23 AM OCHIAI Hiromu [email protected]
wrote:

Facing similar problem. (machine driver is amazonec2)

% docker-machine regenerate-certs my-machine
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
%

and I found this issue, checked

% docker-machine --version
docker-machine version 0.5.6, build 61388e9

so updated to

% docker-machine --version
docker-machine version 0.6.0, build e27fb87

then tried again, but got the same result.

It is certain the docker API daemon on host is up and listening, because I
could get host machine's log below

% docker-machine ssh my-machine
ubuntu@my-machine:~$ sudo docker daemon -D# ... many logs
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2# ... many logs
INFO[0000] API listen on /var/run/docker.sock

DEBU[0018] Calling GET /v1.22/version
DEBU[0018] GET /v1.22/version# these two logs were outputted on regenerate-certs

Is this because this machine is --driver amazonec2? or can I do anything?


Reply to this email directly or view it on GitHub
https://github.com/docker/machine/issues/2533#issuecomment-194728625.

@otiai10 What's the actual output of sudo journalctl -u docker when SSHed into that instance?

@nathanleclaire

:thought_balloon: sorry for containing my trial-and-errors

% docker-machine ssh my-machine
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-18-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

89 packages can be updated.
53 updates are security updates.


*** System restart required ***
Last login: Thu Mar 10 07:43:49 2016 from 124.219.169.171
ubuntu@my-machine:~$ sudo journalctl -u docker
-- Logs begin at Thu 2016-03-10 07:38:24 UTC, end at Fri 2016-03-11 03:21:26 UTC. --
Mar 10 07:41:55 my-machine systemd[1]: Starting Docker Application Container Engine...
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.100877328Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.111232190Z" level=info msg="Firewalld running: false"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.252275662Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.398230144Z" level=warning msg="Your kernel does not support swap memory limit."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454126098Z" level=info msg="Loading containers: start."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454542482Z" level=info msg="Loading containers: done."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454809619Z" level=info msg="Daemon has completed initialization"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.455064837Z" level=info msg="Docker daemon" commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
Mar 10 07:41:55 my-machine systemd[1]: Started Docker Application Container Engine.
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.465182083Z" level=info msg="API listen on /var/run/docker.sock"
Mar 10 07:41:57 my-machine systemd[1]: Stopping Docker Application Container Engine...
Mar 10 07:41:57 my-machine systemd[1]: Stopped Docker Application Container Engine.
Mar 10 07:41:57 my-machine docker[20968]: time="2016-03-10T07:41:57.781410041Z" level=info msg="Processing signal 'terminated'"
Mar 10 07:42:00 my-machine systemd[1]: Started docker.service.
Mar 10 07:42:00 my-machine docker[21618]: flag provided but not defined: -d
Mar 10 07:42:00 my-machine docker[21618]: See '/usr/bin/docker --help'.
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:07 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:07 my-machine docker[22326]: flag provided but not defined: -d
Mar 10 07:45:07 my-machine docker[22326]: See '/usr/bin/docker --help'.
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22344]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22344]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22348]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22348]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22354]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22354]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22361]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22361]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Start request repeated too quickly.
Mar 10 07:45:14 my-machine systemd[1]: Failed to start docker.service.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'start-limit'.
Mar 10 07:45:21 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:51:51 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:51:57 my-machine systemd[1]: Started docker.service.
Mar 10 07:51:57 my-machine docker[23374]: flag provided but not defined: -d
Mar 10 07:51:57 my-machine docker[23374]: See '/usr/bin/docker --help'.
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:53:40 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:53:43 my-machine systemd[1]: Started docker.service.
Mar 10 07:53:43 my-machine docker[24577]: flag provided but not defined: -d
Mar 10 07:53:43 my-machine docker[24577]: See '/usr/bin/docker --help'.
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:58:28 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:58:31 my-machine systemd[1]: Started docker.service.
Mar 10 07:58:31 my-machine docker[25869]: time="2016-03-10T07:58:31.075805960Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:02:47 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:02:50 my-machine systemd[1]: Started docker.service.
Mar 10 08:02:50 my-machine docker[28046]: time="2016-03-10T08:02:50.136510145Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:09:17 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:09:23 my-machine systemd[1]: Started docker.service.
Mar 10 08:09:23 my-machine docker[29349]: time="2016-03-10T08:09:23.381718212Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:10:27 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:10:33 my-machine systemd[1]: Started docker.service.
Mar 10 08:10:33 my-machine docker[30717]: time="2016-03-10T08:10:33.578601333Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:11:15 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:11:19 my-machine systemd[1]: Started docker.service.
Mar 10 08:11:19 my-machine docker[31858]: time="2016-03-10T08:11:19.667703053Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.

@mlabieniec
Thank you!
but it's not found on my region:ap-northeast-1 :crying_cat_face:
so I'll try another AMI existing on Tokyo.

To reproduce this problem and inspect the effect of AMI, I create new machine by hitting

% docker-machine create --driver amazonec2 \
--amazonec2-region ap-northeast-1 \
--amazonec2-vpc-id vpc-123abc \ 
--amazonec2-security-group sg-my-servers \
my-service-machine

In this case, it works completely.
If my memory is correct, it is the same operation as what I got error.
and the AMI is ami-b36d4edd now. I regret NOT having logged AMI in error case.

So sorry, I've lost the way to reproduce this problem.

still waiting for @nathanleclaire's opinion. thanks for your help :)

@otiai10 If you try docker-machine provision my-service-machine on the problematic instance?

I think what happened is:

  • machine <0.6.0 created docker configuration file using -d (deprecated) instead of daemon (you can see this flag in the logs)
  • upgrade of docker version went to a new version which doesn't recognize this flag anymore
  • regenerate-certs doesn't replace the config file so the old (faulty) one was still in place

Anyway glad to hear it's working now @otiai10 !

I'm having the same error message but instead with DigitalOcean using generic driver.

i'm trying, with docker-machine create command, to create a machine over an existing DigitalOcean droplet (i must not create a new one droplet and delete the existing one). Using the digitalocean driver is not valid for this case and i'm using the generic driver solution.
I'm running docker-machine with the Windows 10 Ubuntu subsystem (also i have tried it with Git Bash) and i'm using Windows 10 Pro with Hyperv.

The DigitalOcean droplet has a Ubuntu 18.04.
Docker version is:

root@do-sctv:~# docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b7f0
 Built:             Wed Mar 11 01:25:46 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b7f0
  Built:            Wed Mar 11 01:24:19 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

The command i run is the following:

$ docker-machine create --driver generic --generic-ip-address 142.xx.xxx.xx --generic-ssh-user root --generic-ssh-key ~/.ssh/id_rsa_do_sctv do-sctv

and i get the following output:

Running pre-create checks...
Creating machine...
(do-sctv) Importing SSH key...
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 ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of r
etries (10) exceeded

I have enabled in the ufw firewall the following ports (in the droplet):

ufw allow 22/tcp
ufw allow 2376/tcp
ufw allow 7946/tcp 
ufw allow 7946/udp 
ufw allow 4789/udp

Also, i have tried docker-machine regenerate-certs --force --client-certs do-sctv with the same error.
When doing docker-machine ls i get the following error:

NAME            ACTIVE   DRIVER    STATE     URL                        SWARM   DOCKER    ERRORS
do-sctv         -        generic   Running   tcp://142.xx.xxx.xx:2376           Unknown   Unable to query docker version: Cannot connect to the docker engine endpoint

With docker-machine env do-sctv the output is:

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "142.xx.xxx.xx:2376": dial tcp 142.xx.xxx.xx:2376: connect: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.

Hope you can help me.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings