When the Docker client attempts to reach the daemon through the local Unix socket at /var/run/docker.sock, the server may be unresponsive even if the service appears configured. Initial attempts to launch the daemon through the system's service manager fail immediately:
admin@node-01:~$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
Subsequent client checks confirm the daemon is unreachable:
admin@node-01:~$ docker info
Client:
Context: default
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
In some cases, insufficient permissions on the socket file cause this symptom. A temporary local fix involves granting the current user ownership of the socket, though this does not survive reboots and may not resolve underlying daemon crashes:
admin@node-01:~$ sudo chown $USER /var/run/docker.sock
If the service cnotinues to refuse connections, replacing the existing installation with the Snap-packaged distribution often restores functionality:
admin@node-01:~$ sudo snap install docker
Once the Snap installation completes, validate that both the client and server components are communicatign:
admin@node-01:~$ sudo docker version
Client: Docker Engine - Community
Version: 20.10.3
API version: 1.40
Go version: go1.13.15
Git commit: 48d30b5
Built: Fri Jan 29 14:33:13 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: bd33bbf
Built: Fri Feb 5 15:58:24 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit:
docker-init:
Version: 0.18.0
GitCommit: fec3683
Finally, inspect the runtime state to ensure the daemon is fully initialized:
admin@node-01:~$ sudo docker system info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.13
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc version:
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-65-generic
Operating System: Ubuntu Core 18
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 125.5GiB
Name: node-01
ID: Q2NF:8VYT:PL3K:RM1A:JW4B:9XDU:TC5H:LZG0:VN7E:FK6O:YD8S:3I2M
Docker Root Dir: /var/snap/docker/common/var-lib-docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support