Docker-Machine commands TLS handshake timeout, but Dock Swarmer is working fine

I had problems with the docking machine now, it worked fine earlier, since these are timeouts for teams on machines running the docker in Digital Ocean.

I can use SSH for the machine and Docker Swarm, and our system works fine on machines (the docker node command seems to work fine, like docker node ls, for example).

The problem is that the problem is with the docker machine. I had something similar in the past, and this could be fixed by increasing the timeout, but now it does not help.

The error seems to be caused by the net / http HTLS connection timeout as the output from:

docker-machine ls - timeout 30

shows:

NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Stopped Unknown dev-m0 - digitalocean Error Unknown Get https://api.digitalocean.com/v2/droplets/42100174: net/http: TLS handshake timeout dev-w1 - digitalocean Error Unknown Get https://api.digitalocean.com/v2/droplets/42115817: net/http: TLS handshake timeout ... repeated for all managers and workers. 

I am running Docker CE version 17.05.0-ce-rc1-mac8 Edge on my Mac and 17.03.0-ce on Linux machines on Digital Ocean (it seems they are available to them for the last time). I swapped between Edge and Stable on a Mac to make sure this caused the problem, but that didn't help.

I restarted the machines (stop and start). I did not regenerate the certificates, because I can SSH into machines with the ssh dev-m1 docking machine without problems, so it did not seem to me that certificates would be a problem for me. I am not trying to run any containers locally.

This all works great in the past, but has recently stopped.

Any help or suggestions that are most appreciated.

Thanks Ashley.

+7
linux docker docker-swarm docker-machine digital-ocean
source share
1 answer

Hypotheses

My guess is that the time inside your client virtual machine dock is not synchronized with the digital ocean server, and this leads to a failure in TLS. Try to synchronize the clock by running this command on your mac:

 $ docker run --rm --privileged alpine hwclock -s 

This command will set the clock inside the virtual machine to the clock on your mac using the hwclock command. It needs privileged access because the container needs to read the time from the host hardware.

Explanation

The docker client on your Mac runs inside a thin virtual machine. Clock synchronization in a virtual machine may not be synchronized with the time on your Mac and the time of the outside world, especially if you use docker on a laptop that is allowed to sleep. In this case, de-synchronization can cause problems with any operations that should know the time that occurred on the docker server (inside the virtual machine), and compare this with events that occurred outside the docker server. I suspect the TLS handshake with the digital ocean is one such operation.

I am having problems with docker events that did not behave as I expected. After a long thread in the problems section with the docker repository ( moby / moby # 25579 ), we found out that the reason for the clock was out of sync .

+3
source share

All Articles