Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FATA[0000] Get http:///var/run/docker.sock/v1.17/version: dial unix /var/run/docker.sock

Tags:

linux

docker

I install docker using this guide. I'm using

Distributor ID: Ubuntu
Description:    Ubuntu 13.10
Release:    13.10
Codename:   saucy

Even though I excetly followed the steps given I get below error when I issue docker version command.

Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
FATA[0000] Get http:///var/run/docker.sock/v1.17/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

I aleardy referred below, but it does not work for me. Most of the them focus on Mac OS X

Installing a web application in a Docker container: dial unix /var/run/docker.sock: no such file or directory

docker error: /var/run/docker.sock: no such file or directory

Am I trying to connect to a TLS-enabled daemon without TLS?

How can I fix this?

Please see the O/P below

INFO[0000] +job serveapi(unix:///var/run/docker.sock)   
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
DEBU[0000] Registering POST, /containers/{name:.*}/resize 
DEBU[0000] Registering POST, /containers/create         
DEBU[0000] Registering POST, /containers/{name:.*}/kill 
DEBU[0000] Registering POST, /containers/{name:.*}/start 
DEBU[0000] Registering POST, /containers/{name:.*}/stop 
DEBU[0000] Registering POST, /containers/{name:.*}/copy 
DEBU[0000] Registering POST, /containers/{name:.*}/exec 
DEBU[0000] Registering POST, /exec/{name:.*}/start      
DEBU[0000] Registering POST, /auth                      
DEBU[0000] Registering POST, /build                     
DEBU[0000] Registering POST, /containers/{name:.*}/wait 
DEBU[0000] Registering POST, /containers/{name:.*}/attach 
DEBU[0000] Registering POST, /images/{name:.*}/tag      
DEBU[0000] Registering POST, /containers/{name:.*}/pause 
DEBU[0000] Registering POST, /containers/{name:.*}/rename 
DEBU[0000] Registering POST, /commit                    
DEBU[0000] Registering POST, /images/create             
DEBU[0000] Registering POST, /images/load               
DEBU[0000] Registering POST, /images/{name:.*}/push     
DEBU[0000] Registering POST, /containers/{name:.*}/unpause 
DEBU[0000] Registering POST, /containers/{name:.*}/restart 
DEBU[0000] Registering POST, /exec/{name:.*}/resize     
DEBU[0000] Registering DELETE, /containers/{name:.*}    
DEBU[0000] Registering DELETE, /images/{name:.*}        
DEBU[0000] Registering OPTIONS,                         
DEBU[0000] Registering GET, /containers/{name:.*}/json  
DEBU[0000] Registering GET, /events                     
DEBU[0000] Registering GET, /images/search              
DEBU[0000] Registering GET, /images/get                 
DEBU[0000] Registering GET, /images/{name:.*}/get       
DEBU[0000] Registering GET, /images/{name:.*}/history   
DEBU[0000] Registering GET, /containers/json            
DEBU[0000] Registering GET, /containers/{name:.*}/export 
DEBU[0000] Registering GET, /info                       
DEBU[0000] Registering GET, /images/viz                 
DEBU[0000] Registering GET, /containers/{name:.*}/top   
DEBU[0000] Registering GET, /containers/{name:.*}/logs  
DEBU[0000] Registering GET, /containers/{name:.*}/stats 
DEBU[0000] Registering GET, /exec/{id:.*}/json          
DEBU[0000] Registering GET, /_ping                      
DEBU[0000] Registering GET, /images/json                
DEBU[0000] Registering GET, /images/{name:.*}/json      
DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws 
DEBU[0000] Registering GET, /version                    
DEBU[0000] Registering GET, /containers/ps              
DEBU[0000] Registering GET, /containers/{name:.*}/changes 
DEBU[0000] docker group found. gid: 999                 
DEBU[0000] Using graph driver aufs                      
DEBU[0000] Migrating existing containers                
DEBU[0000] Creating images graph                        
DEBU[0000] Restored 0 elements                          
DEBU[0000] Creating repository list                     
INFO[0000] +job init_networkdriver()                    
DEBU[0000] /sbin/iptables, [--wait -C POSTROUTING -t nat -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE] 
DEBU[0000] /sbin/iptables, [--wait -D FORWARD -i docker0 -o docker0 -j DROP] 
DEBU[0000] /sbin/iptables, [--wait -C FORWARD -i docker0 -o docker0 -j ACCEPT] 
DEBU[0000] /sbin/iptables, [--wait -C FORWARD -i docker0 ! -o docker0 -j ACCEPT] 
DEBU[0000] /sbin/iptables, [--wait -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -F DOCKER]    
DEBU[0000] /sbin/iptables, [--wait -t nat -X DOCKER]    
DEBU[0000] /sbin/iptables, [--wait -t nat -n -L DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -N DOCKER]    
DEBU[0000] /sbin/iptables, [--wait -C -m addrtype --dst-type LOCAL] 
DEBU[0000] /sbin/iptables, [--wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -C -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8] 
DEBU[0000] /sbin/iptables, [--wait -t nat -A OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t filter -n -L DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -C FORWARD -o docker0 -j DOCKER] 
INFO[0000] -job init_networkdriver() = OK (0)           
INFO[0000] WARNING: Your kernel does not support cgroup swap limit. 
DEBU[0000] Restarting containers...                     
INFO[0000] docker daemon: 1.5.0 a8a31ef; execdriver: native-0.2; graphdriver: aufs 
INFO[0000] +job acceptconnections()                     
INFO[0000] -job acceptconnections() = OK (0)            
DEBU[0022] Calling GET /version                         
INFO[0022] GET /v1.17/version                           
INFO[0022] +job version()                               
INFO[0022] -job version() = OK (0)
like image 931
Techie Avatar asked Mar 27 '15 06:03

Techie


People also ask

How do I fix VAR run Docker sock connect permission denied?

Restarting the Docker Engine Similar to running a docker command without the sudo command, a stopped Docker Engine triggers the permission denied error. How do you fix the error? By restarting your Docker engine.

What does VAR run Docker sock :/ var run Docker sock do?

sock is basically the Unix socket the Docker daemon listens on by default. It is also a tool used to communicate with the Docker daemon from within a container. Sometimes, containers need to bind mount the /var/run/docker.

What permissions should Docker sock have?

The Docker socket file should therefore have permissions of 660 or more restrictive permissions.


3 Answers

I had similar problem on Ubuntu 14.04, 3.13.0-39-generic The solution was:

sudo apt-get install apparmor

service docker restart

like image 96
mrother Avatar answered Sep 20 '22 14:09

mrother


The problem is that your user has not been added to the docker group.

Try:

sudo usermod -a -G docker <uname> 

If you don't want to log in/out from your current shell, run:

newgrp docker 
like image 42
Jeff Avatar answered Sep 16 '22 14:09

Jeff


This error is because you have not started the docker service. Once you start the service it creates /var/run/docker.sock and then the error is resolved.

sudo service docker start

Then you can see if the installation is proper or not by sudo docker info.

like image 40
nkt24 Avatar answered Sep 20 '22 14:09

nkt24