https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Bug ID: 1149882 Summary: docker socket not found errors Product: Fedora Version: 20 Component: docker-io Assignee: lsm5@fedoraproject.org Reporter: bparees@redhat.com QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, golang@lists.fedoraproject.org, hushan.jia@gmail.com, jperrin@centos.org, lsm5@fedoraproject.org, mattdm@redhat.com, mgoldman@redhat.com, s@shk.io, thrcka@redhat.com, vbatts@redhat.com
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
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Ben Parees bparees@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|lsm5@fedoraproject.org |vbatts@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Daniel Walsh dwalsh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dwalsh@redhat.com
--- Comment #1 from Daniel Walsh dwalsh@redhat.com --- The socket should be created by the systemd if docker.socket is enabled.
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Lokesh Mandvekar lsm5@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED See Also| |https://bugzilla.redhat.com | |/show_bug.cgi?id=1146705 Assignee|vbatts@redhat.com |lsm5@fedoraproject.org
--- Comment #2 from Lokesh Mandvekar lsm5@fedoraproject.org --- 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 $
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Eric Paris eparis@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eparis@redhat.com
--- Comment #3 from Eric Paris eparis@redhat.com --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
--- Comment #4 from Ben Parees bparees@redhat.com --- lokesh's suggestion does fix the issue, btw (vincent helped me w/ that yesterday)
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
--- Comment #5 from Vincent Batts vbatts@redhat.com --- https://github.com/docker/docker/pull/8451
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
--- Comment #6 from Fedora Update System updates@fedoraproject.org --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
--- Comment #7 from Fedora Update System updates@fedoraproject.org --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #8 from Fedora Update System updates@fedoraproject.org --- 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.... then log in and leave karma (feedback).
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version| |docker-io-1.3.0-1.fc20 Resolution|--- |ERRATA Last Closed| |2014-10-26 23:27:53
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1149882
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|docker-io-1.3.0-1.fc20 |docker-io-1.2.0-5.fc21
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- 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.
golang@lists.fedoraproject.org