Description of problem: When run as a service, I frequently run into issues with the /var/run/docker.sock being reported as not found, but if i shutdown the service, remove /var/run/docker.sock, and run "docker -d" manually instead, I have no such problem. In addition, systemctl start docker does not appear to consistently create /var/run/docker.sock, though the docker daemon reports as running. Version-Release number of selected component (if applicable): docker-io-1.2.0-2.fc20.x86_64 How reproducible: Intermittent, most consistently recreates when bind mounting the docker socket into a docker container and trying to perform docker operations from within that container. Additional info: Disabling selinux has no effect on the results. Sample output: running as a service: [bparees@bparees ~]$ ps ax | grep docker 10731 ? Ssl 0:00 /usr/bin/docker -d -H fd:// --selinux-enabled 11021 pts/6 S+ 0:00 grep --color=auto docker [bparees@bparees ~]$ ls -l /var/run/docker* -rw-r--r--. 1 root root 5 Oct 6 16:08 /var/run/docker.pid [bparees@bparees ~]$ docker ps 2014/10/06 16:10:03 Get http:///var/run/docker.sock/v1.14/containers/json: dial unix /var/run/docker.sock: no such file or directory restarting manually: [bparees@bparees ~]$ sudo systemctl stop docker [sudo] password for bparees: Warning: Stopping docker, but it can still be activated by: docker.socket [bparees@bparees ~]$ sudo docker -d >& /tmp/out & [1] 11343 [bparees@bparees ~]$ ls -l /var/run/docker.* -rw-r--r--. 1 root root 5 Oct 6 16:10 /var/run/docker.pid srw-rw----. 1 root docker 0 Oct 6 16:10 /var/run/docker.sock [bparees@bparees ~]$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
The socket should be created by the systemd if docker.socket is enabled.
Ben, could you check if things work better after a 'systemctl restart docker.socket' ? fwiw, this seems to work best on my rawhide machine. I stopped docker and rm'd docker.sock prior to below steps. lsm5 @ naruto : /var/run $ ls -al | grep docker lsm5 @ naruto : /var/run $ systemctl start docker lsm5 @ naruto : /var/run $ ls -al | grep docker -rw-r--r--. 1 root root 5 Oct 6 18:41 docker.pid lsm5 @ naruto : /var/run $ systemctl restart docker lsm5 @ naruto : /var/run $ ls -al | grep docker -rw-r--r--. 1 root root 5 Oct 6 18:41 docker.pid lsm5 @ naruto : /var/run $ systemctl restart docker.socket lsm5 @ naruto : /var/run $ ls -al | grep docker -rw-r--r--. 1 root root 5 Oct 6 18:41 docker.pid srw-rw----. 1 root docker 0 Oct 6 18:41 docker.sock lsm5 @ naruto : /var/run $
A little bit of systemd knowledge was dropped on my and I have this working now. I'll try to get patches everywhere tomorrow. Below look good? Socket activation works. Service enablement works. Deleting the /var/run/docker.sock is fine the next time you restart the docker.socket or start the docker.service. But for now, sleep. # systemctl stop docker.service # rm /var/run/docker.sock rm: remove socket ‘/var/run/docker.sock’? y # docker ps 2014/10/06 22:34:23 Get http:///var/run/docker.sock/v1.14/containers/json: dial unix /var/run/docker.sock: no such file or directory # systemctl start docker.service # docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES # systemctl stop docker.service # systemctl start docker.socket # ps -ef | grep docker root 4618 3922 0 22:34 pts/0 00:00:00 grep --color=auto docker # docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES # ps -ef | grep docker root 4626 1 0 22:35 ? 00:00:00 /usr/bin/docker -d -H fd:// --selinux-enabled root 4692 3922 0 22:35 pts/0 00:00:00 grep --color=auto docker
lokesh's suggestion does fix the issue, btw (vincent helped me w/ that yesterday)
https://github.com/docker/docker/pull/8451
docker-io-1.2.0-5.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/docker-io-1.2.0-5.fc21
docker-io-1.2.0-5.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-1.2.0-5.fc20
Package docker-io-1.2.0-5.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing docker-io-1.2.0-5.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-12635/docker-io-1.2.0-5.fc20 then log in and leave karma (feedback).
docker-io-1.3.0-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-1.3.0-1.fc20
docker-io-1.3.0-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
docker-io-1.2.0-5.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.