Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#53564 - [docker] Cannot connect to daemon

Attached to Project: Community Packages
Opened by Tomas Sironi (sironitomas) - Tuesday, 04 April 2017, 23:48 GMT
Last edited by Sébastien Luttringer (seblu) - Sunday, 06 August 2017, 20:31 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Cannot connect to Docker daemon

I had the problem described in that issue, and solved it doing what I commented.

https://github.com/docker/docker/issues/17645#issuecomment-291673097


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:

pacman -Syu docker
systemctl start docker
docker info

An error will appear:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Sunday, 06 August 2017, 20:31 GMT
Reason for closing:  Fixed
Comment by Andrew Steinke (rkcf) - Wednesday, 05 April 2017, 00:37 GMT
I did the update, and did not encounter this problem. Docker started fine, and docker info worked as expected.

What is the output of:
systemctl status docker

That may have some clues as to why it is not working.
Comment by Matthew Welke (welkie) - Tuesday, 11 April 2017, 15:10 GMT
Without sudo, the docker commands will all report being unable to connect to the Docker daemon (unless you add your user to a special group). Does this problem continue if you try "sudo docker info"?
Comment by Tomas Sironi (sironitomas) - Tuesday, 11 April 2017, 15:17 GMT
Yes, it does continue. The other workaround, without changing the service file, is to: export DOCKER_HOST=localhost
Comment by Matthew Welke (welkie) - Tuesday, 11 April 2017, 15:23 GMT
I see.

I didn't have Docker installed on my machine I'm on right now, so I did so. I did:

sudo pacman -S docker
sudo systemctl start docker
sudo docker ps

And I got a list of running containers (none right now). For me, this issue isn't occurring. I'm on Antergos.
Comment by Tomas Sironi (sironitomas) - Tuesday, 11 April 2017, 17:33 GMT
Yes, it does continue. The other workaround, without changing the service file, is to: export DOCKER_HOST=localhost
Comment by Tomas Sironi (sironitomas) - Tuesday, 11 April 2017, 17:34 GMT
This is the output of systemctl status docker

● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2017-04-11 14:33:49 -03; 3s ago
Docs: https://docs.docker.com
Main PID: 13294 (dockerd)
Tasks: 20 (limit: 4915)
Memory: 64.5M
CPU: 392ms
CGroup: /system.slice/docker.service
├─13294 /usr/bin/dockerd -H fd://
└─13319 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout

Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.077531987-03:00" level=warning msg="Your kernel does not support
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.077557179-03:00" level=warning msg="Your kernel does not support
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.078163298-03:00" level=info msg="Loading containers: start."
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.115498808-03:00" level=info msg="Firewalld running: false"
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.296954299-03:00" level=info msg="Default bridge (docker0) is ass
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.355275873-03:00" level=info msg="Loading containers: done."
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.395822405-03:00" level=info msg="Daemon has completed initializa
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.395871202-03:00" level=info msg="Docker daemon" commit=4845c567e
Apr 11 14:33:49 samsung-tomas dockerd[13294]: time="2017-04-11T14:33:49.408469078-03:00" level=info msg="API listen on 0.0.0.0:2375"
Apr 11 14:33:49 samsung-tomas systemd[1]: Started Docker Application Container Engine.
lines 1-22/22 (END)

Loading...