Docker Community Forums

Share and learn in the Docker community.

Docker: Error response from daemon: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused": unknown

(Turbogus) #1

I am getting the error “docker: Error response from daemon: connection error: desc = “transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused”: unknown.” when trying to restart existing containers, run new containers, docker top, docker exec, and probably more commands I have not listed. I also only dashes when I do docker stats. I can list containers and see they are running and I am able to use the apps on the containers as expected. Any thoughts?

docker info
Containers: 11
Running: 10
Paused: 0
Stopped: 1
Images: 12
Server Version: 17.11.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: N/A (expected: 992280e8e265f491f7a624ab82f3e238be086e49)
runc version: 0351df1c5a66838d0c392b4ac4cf9450de844e2d
init version: 949e6fa
Security Options:
Profile: default
Kernel Version: 4.4.0-104-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 120.7GiB
Name: myserver
ID: my:server:id
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Experimental: false
Insecure Registries:
Live Restore Enabled: false

WARNING: No swap limit support

(Sean Abbott) #2

I am also having this issue.

I appear to have started also also not having docker be able to delete some containers after they finished running.

Log messages like
Jan 5 14:59:53 dockerd: time=“2018-01-05T14:59:53.067411517-05:00” level=error msg=“Failed to remove container fc78917e0612f0a81be9210fac5cdc21e3534ea13af468ab4f1b214ceead1afb: N
o such container: fc78917e0612f0a81be9210fac5cdc21e3534ea13af468ab4f1b214ceead1afb”

(Evertramos) #3

Do you have your sock mounted to any other cotnainer such as Portainer? Or are you using any webproxy?

(Turbogus) #4

I have this sumologic container with /var/run/docker.sock:/var/run/docker.sock as a volume. That container had been running for about a week before these problems started.

(Yogeenloriya) #5

I am getting the same error.
The problem is the /var/run/docker is not accessible from the current login user in ubuntu. That’s why it could not connect to the container. And throwing the connection refused error.

(Rdaems) #6

Also getting errors with latest docker-ce: v17-12

(Harishchadalawada) #7

Above all the issues the best way is to restart docker and then perform commands in it. for ubuntu service docker restart
This fix my problems…:grinning:

(Rhetzler) #8

I am getting the same error, docker for mac.

Restarting docker of course clears the problem, but only temporarily. I am several restarts deep and hoping not to have to do it anymore. The nature of docker for mac means restarts probably take much longer than the pure linux experience.

(Mezhov) #9

Hello. I have the same error on Windows after the latest update:

Docker version 17.12.0-ce, build c97c6d6

Yes, if I restart Docker, everything works but doing it several times during a day is not convenient. Do you plan to fix it in the nearest future?

(Ssnookala) #10

Hello I am getting similar error.

Error response from daemon: Could not kill running container 5a7e6e7bab09b8987a1757490dea6dd3626763acb17e3eadacd4d9641ddce511, cannot remove - Cannot kill container 5a7e6e7bab09b8987a1757490dea6dd3626763acb17e3eadacd4d9641ddce511: connection error: desc = “transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused”: unknown

Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:09:53 2017
OS/Arch: linux/amd64
Experimental: false

Is there any update on this? Thanks

(Blackburro) #11

Has anyone found a solution for this?? My company uses docker on the mac for local testing of container networking before they are pushed to AWS for hosting. The problem with local testing is, there is absolutely no excuse for my cpu usage to skyrocket to over 410% and sound like my mac is about to take off through the window…I am simply trying to test my oplog-monitor but each time I spin up my elasticsearch container, everything gets loud, fails, and now I’m 6 restarts deep with no progress and no solution.


(Psdev) #12

I also get this error.
$ sudo docker kill 123456
Error response from daemon: Cannot kill container: 123456: Cannot kill container 123456: connection error: desc = “transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused”: unknown

$ docker version
Version: 17.12.1-ce
API version: 1.35
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:17:40 2018
OS/Arch: linux/amd64

Version: 17.12.1-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:16:13 2018
OS/Arch: linux/amd64
Experimental: false

(Jonesrg) #13

I was getting this error on my Mac, 10.12.6, Docker 17.?.? (upgraded to 18.03.0-ce-mac59 (23608) in attempt to fix, with no luck). Also was getting CPU bound when this happened…

Figured out I didn’t have enough memory allocated to Docker (Preferences->Advanced->Memory).

Details: The condition arose over a month after I had granted a DIND container max of 2G, and Docker overall was set to max of 2G. When the container finally started needing somewhere above 700M, the disconnect/CPU-bound condition would arise. Nothing but restarting Docker would fix it. I haven’t seen the condition since I allocated 8G memory to Docker.

(A8568730) #14

It seems to have bug in containerd, see below:

Reported workaround is to killall -9 dockerd or reboot the system, but it’s better update docker version to 17.12.1 or 18.03 .