Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 2.0

Hi, pretty new, thanks in advance.
Ubuntu 1804.
Docker version 18.09.0, build 4d60db4
This issue seemed to emerge after trying to install docker-compose.

Completely removed docker-ce docker-ce-cli, and everything docker related and reinstalled.
Reboot and new terminal
Issue persists.

(base) james@james-desktop:~$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─hosts.conf, override.conf
Active: failed (Result: exit-code) since Tue 2018-12-11 14:47:51 ACDT; 10min ago
Process: 2368 ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2375 (code=exited, status=1/FAILURE)
Main PID: 2368 (code=exited, status=1/FAILURE)

Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Dec 11 14:47:51 james-desktop systemd[1]: Stopped Docker Application Container Engine.
Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Start request repeated too quickly.
Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Failed with result ‘exit-code’.
Dec 11 14:47:51 james-desktop systemd[1]: Failed to start Docker Application Container Engine.

(base) james@james-desktop:~$ journalctl -xe
Dec 11 14:55:15 james-desktop sudo[4075]: james : TTY=pts/0 ; PWD=/home/james ; USER=root ; COMMAND=/bin/chmod o-r /etc/
Dec 11 14:55:15 james-desktop sudo[4075]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 11 14:55:15 james-desktop sudo[4075]: pam_unix(sudo:session): session closed for user root
Dec 11 14:55:28 james-desktop org.gnome.Shell.desktop[2444]: received message
Dec 11 14:55:53 james-desktop sudo[4148]: james : TTY=pts/0 ; PWD=/home/james ; USER=root ; COMMAND=/bin/chmod o-w /etc/
Dec 11 14:55:53 james-desktop sudo[4148]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 11 14:55:53 james-desktop sudo[4148]: pam_unix(sudo:session): session closed for user root
Dec 11 14:56:13 james-desktop dbus-daemon[2158]: [session uid=1000 pid=2158] Activating via systemd: service name='org.gnom
Dec 11 14:56:13 james-desktop systemd[1938]: Starting GNOME Terminal Server…
– Subject: Unit UNIT has begun start-up
– Defined-By: systemd

– Unit UNIT has begun starting up.
Dec 11 14:56:13 james-desktop dbus-daemon[2158]: [session uid=1000 pid=2158] Successfully activated service 'org.gnome.Term
Dec 11 14:56:13 james-desktop systemd[1938]: Started GNOME Terminal Server.
– Subject: Unit UNIT has finished start-up
– Defined-By: systemd

– Unit UNIT has finished starting up.

– The start-up result is RESULT.
lines 1015-1037/1037 (END)

Any help much appreciated.

Hi

Can you try and run: dockerd as root
And paste the output?

Thanks.

root@james-desktop:~# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
Drop-In: /etc/systemd/system/docker.service.d
└─hosts.conf, override.conf
Active: failed (Result: exit-code) since Tue 2018-12-11 14:47:51 ACDT; 19h ag
Docs: https://docs.docker.com
Main PID: 2368 (code=exited, status=1/FAILURE)

Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Service hold-off time
Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Scheduled restart job,
Dec 11 14:47:51 james-desktop systemd[1]: Stopped Docker Application Container E
Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Start request repeated
Dec 11 14:47:51 james-desktop systemd[1]: docker.service: Failed with result 'ex
Dec 11 14:47:51 james-desktop systemd[1]: Failed to start Docker Application Con

root@james-desktop:~# journalctl -xe
– Unit UNIT has finished starting up.

– The start-up result is RESULT.
Dec 12 10:35:40 james-desktop systemd[27846]: Startup finished in 547ms.
– Subject: User manager start-up is now complete
– Defined-By: systemd
– Support: http://www.ubuntu.com/support

– The user manager instance for user 0 has been started. All services queued
– for starting have been started. Note that other services might still be start
– up or be started at any later time.

– Startup of the manager took 547719 microseconds.
Dec 12 10:35:40 james-desktop systemd[1]: Started User Manager for UID 0.
– Subject: Unit user@0.service has finished start-up
– Defined-By: systemd
– Support: http://www.ubuntu.com/support

– Unit user@0.service has finished starting up.

– The start-up result is RESULT.
Dec 12 10:36:54 james-desktop systemd[1]: Configuration file /etc/systemd/system
Dec 12 10:36:54 james-desktop systemd[1]: Configuration file /etc/systemd/system

root@james-desktop:~# docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

root@james-desktop:~# dockerd
INFO[2018-12-13T13:03:14.807085754+10:30] systemd-resolved is running, so using resolvconf: /run/systemd/resolve/resolv.conf
INFO[2018-12-13T13:03:14.932826601+10:30] parsed scheme: “unix” module=grpc
INFO[2018-12-13T13:03:14.932845575+10:30] scheme “unix” not registered, fallback to default scheme module=grpc
INFO[2018-12-13T13:03:14.947404717+10:30] parsed scheme: “unix” module=grpc
INFO[2018-12-13T13:03:14.947413885+10:30] scheme “unix” not registered, fallback to default scheme module=grpc
INFO[2018-12-13T13:03:15.001861350+10:30] [graphdriver] using prior storage driver: overlay2
INFO[2018-12-13T13:03:15.026559106+10:30] ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 }] module=grpc
INFO[2018-12-13T13:03:15.026632760+10:30] ClientConn switching balancer to “pick_first” module=grpc
INFO[2018-12-13T13:03:15.026613730+10:30] ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 }] module=grpc
INFO[2018-12-13T13:03:15.026696937+10:30] ClientConn switching balancer to “pick_first” module=grpc
INFO[2018-12-13T13:03:15.026761266+10:30] pickfirstBalancer: HandleSubConnStateChange: 0xc4202002d0, CONNECTING module=grpc
INFO[2018-12-13T13:03:15.026796170+10:30] pickfirstBalancer: HandleSubConnStateChange: 0xc420236200, CONNECTING module=grpc
INFO[2018-12-13T13:03:15.027082856+10:30] pickfirstBalancer: HandleSubConnStateChange: 0xc4202002d0, READY module=grpc
INFO[2018-12-13T13:03:15.027129202+10:30] pickfirstBalancer: HandleSubConnStateChange: 0xc420236200, READY module=grpc
INFO[2018-12-13T13:03:15.247402922+10:30] Graph migration to content-addressability took 0.00 seconds
WARN[2018-12-13T13:03:15.247636802+10:30] Your kernel does not support swap memory limit
WARN[2018-12-13T13:03:15.247663273+10:30] Your kernel does not support cgroup rt period
WARN[2018-12-13T13:03:15.247669819+10:30] Your kernel does not support cgroup rt runtime
INFO[2018-12-13T13:03:15.249387189+10:30] Loading containers: start.
INFO[2018-12-13T13:03:16.530588335+10:30] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2018-12-13T13:03:16.742222018+10:30] Loading containers: done.
INFO[2018-12-13T13:03:18.280447510+10:30] Docker daemon commit=4d60db4 graphdriver(s)=overlay2 version=18.09.0
INFO[2018-12-13T13:03:18.289808289+10:30] Daemon has completed initialization
INFO[2018-12-13T13:03:18.670790392+10:30] API listen on /var/run/docker.sock

what i meant, is as the user root, run command: dockerd

this will start docker in the foreground, and you will see what problems docker is having :slight_smile: