Docker practice 6:cannot Connect to the Docker daemon.

Source: Internet
Author: User

is free to apply to the Aliyun host, of course, to use Docker to deploy my server. But today we have a problem with the following details:

# Docker Info
fata[0000] Cannot connect to the Docker daemon. Is ' docker-d ' running to this host? 
# docker-d
info[0000] +job serveapi (unix:///var/run/docker.sock)   
fata[0000] PID file found, ensure Docker is not Running or Delete/var/run/docker.pid 

First check to see if the Docker daemon is running.

# PS aux | grep Docker
root       691  0.0  1.6 506388 17068?        SSL  Mar07   0:45/usr/bin/docker-d
root      1330  0.0  0.8 124088  ?        Sl   Mar07   0:01 docker-proxy-proto tcp-host-ip 0.0.0.0-host-port 80-container-ip- Container-port
root      9607  0.0  0.0 11720 896 pts/2 s+   16:50   0:00 grep--color=auto Docker

In this way, Docker Deamon is running, but it should not be a mistake to report this error. Then stop it, and then start.

# service Docker Stop
PS aux | grep docker
root      9624  0.0  0.0   11716 636 PTS/2 s+ 16:52   0:00 grep--color=auto Docker
# docker-d
info[0000] +job serveapi (unix:///var/run/docker.sock)   
info[0000] Listening for HTTP on Unix (/var/run/docker.sock) 
INFO[0000] +job init_networkdriver ()                    
info[0000]-job init_networkdriver () = OK (0)           
info[0000] Warning:your Kernel does not support Cgroup swap limit. 
INFO[0000] Loading Containers:start.                   
..........
INFO[0001] Loading containers:done.                    
INFO[0001] Docker daemon:1.5.0 a8a31ef; execdriver:native-0.2; Graphdriver:aufs 
info[0001] +job acceptconnections ()                     
info[0001]-job acceptconnections () = OK (0)      

Well, the most interesting thing is that I worked well under root, but now it's like a hell of a problem. After the completion of the above work, there are still problems. Finally I used sudo to solve the problem. As follows:

# sudo docker info containers:5 images:32 Storage driver:aufs Root Dir:/var/lib/docker/aufs backing Filesystem:extfs dirs:42 Execution driver:native-0.2 Kernel version:3.13.0-32-generic operating System:ubun Tu 14.04.1 LTS 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.