Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error checking TLS connection: Error checking and/or regenerating the certs

After I restarted my windows i cannot connect to docker machine running in Oracle Virtual Box. When i start Docker QuickStart Terminal every thing looks fine, it's coming up OK and it gives me this message:

docker is configured to use the default machine with IP 192.168.99.100 For help getting started, check out the docs at https://docs.docker.com 

but when i do:

$ docker-machine ls NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS default   -        virtualbox   Timeout 

and:

λ docker images An error occurred trying to connect: Get http://localhost:2375/v1.21/images/json: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it. 

also when i try to reinitialize my env., i get:

λ docker-machine env default Error checking TLS connection: 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. 

BTW, Regenerating certs also not helping. Any idea?

Thanks.

like image 966
Hazhir Avatar asked Jan 06 '16 19:01

Hazhir


2 Answers

Please try regenerating certificates manually by:

docker-machine --debug regenerate-certs -f default 

and check for any errors to fix, then try again:

docker-machine --debug env default 

If it's failing on ssh, copy and paste that command into terminal to see what's the problem by adding extra -vv.

If you've got:

debug1: connect to address 127.0.0.1 port 64368: Connection refused

then your machine isn't running (check by docker-machine ls), so try:

docker-machine start 

Then try to ssh to it via:

docker-machine -D ssh default 
like image 111
kenorb Avatar answered Nov 08 '22 06:11

kenorb


After doing some research I found out that following workaround may solve the issue for now:

  1. Open Network And Sharing Center

  2. Click on Change Adapter Setting

  3. See if you have any enabled adapters such as VPN or VM Ware network adapters.

  4. Try to disable them and try to connect to your container one more time

  5. If it didn't work while you have other adapters disabled, Restart your PC - in my case this worked for me.

like image 23
Hazhir Avatar answered Nov 08 '22 06:11

Hazhir