Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker: Are you trying to connect to a TLS-enabled daemon without TLS?

On Linux Mint 17.1 x86_64 with kernel 3.13.0-48-generic and OpenSSL version 1.0.1f-1ubuntu2.11; whenever I try to execute any docker command (like docker login or docker run hello-world), I get the following error:

FATA[0000] Get http:///var/run/docker.sock/v1.18/info: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? 

I have made a group called docker using sudo usermod -aG docker username, I have tried running the commands both as root and normally, added $(boot2docker shellinit 2> /dev/null) to ~/.profile as instructed here, restarted my PC and reinstalled OpenSSL.

Any idea what am I missing? Can this be a hardware issue?

like image 258
strNOcat Avatar asked Apr 17 '15 15:04

strNOcat


People also ask

What is TLS Docker?

The TLS certificates are used by the LabKey Server to authenticate to the Docker Daemon process. Create the directory that will hold the CA certificate/key and the Client certificate/key. You can use a different directory if you want than the one shown below.


3 Answers

You can check if it has started by running the command ps -ef. You can also grep it to docker if you want to reduce the number of results(using | grep docker). If its of not running, execute

sudo service docker start 

OR if it still doesn't work then

You can refer this link

docker docs

You can run docker run -d or docker run -d & so that you can use the same terminal or even close it if. It will set the value to true, so your container will run in "detached" mode, in the background.

You can also auto start it when your OS starts using update-rc.d servicename defaults or you can also refer to the links below, where you have to give docker as service name and your defaults.

Some more links to refer - auto start, upstart

These are different ways of doing it.

like image 198
Tejus Prasad Avatar answered Sep 24 '22 18:09

Tejus Prasad


I deployed docker on CentOS 7, and my friend first helped me check whether the process/service docker is actually running or not. He used the command ps -ef | grep docker. It turned out that the process wasn't running at all. Finally, he started this process by using the command service docker start. In the end, the problem was solved.

like image 29
Randolph Kevin Avatar answered Sep 23 '22 18:09

Randolph Kevin


Try installing apparmor

sudo apt install apparmor

There are other things to look for in this answer too.

like image 43
matiasg Avatar answered Sep 25 '22 18:09

matiasg