5

I installed Docker but can't start it. I also installed Docker Engine and Docker machine but none of them are working

caner@vegan:~/hb-productupload/docker/dev$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sal 2016-09-20 11:19:24 EEST; 1min 38s ago
     Docs: https://docs.docker.com
  Process: 4905 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 4905 (code=exited, status=1/FAILURE)

Eyl 20 11:19:24 vegan systemd[1]: Starting Docker Application Container Engine...
Eyl 20 11:19:24 vegan dockerd[4905]: time="2016-09-20T11:19:24.023531856+03:00" level=fatal msg="Error starting daemon: pi
Eyl 20 11:19:24 vegan systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Eyl 20 11:19:24 vegan systemd[1]: Failed to start Docker Application Container Engine.
Eyl 20 11:19:24 vegan systemd[1]: docker.service: Unit entered failed state.
Eyl 20 11:19:24 vegan systemd[1]: docker.service: Failed with result 'exit-code'.

caner@vegan:~/hb-productupload/docker/dev$ docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
c

I am on 16.04 ubuntu

Zanna
  • 70,465
mark
  • 1,253

4 Answers4

3

Restart the docker service -

sudo systemctl restart docker

Share output of below command -

sudo journalctl -xe

Check the logs & also see the last comment on the below link, you may find something similar to already reported issues with docker daemon failure.
https://github.com/moby/moby/issues/25913

vivekyad4v
  • 524
  • 1
  • 6
  • 12
2

Run all docker command as root user or add your user group with docker user group.

First, try to start docker with root user or use sudo, if everything is running then add your user in docker group using sudo usermod -aG docker $USER command.

storm
  • 4,973
0

I had the exact same problem after installing, and according to syslog the issue was with docker failing to initialise the network controller:

May 14 18:40:42 <hostname> dockerd[24866]:
time="2020-05-14T18:40:42.211829609+02:00" level=info 
msg="stopping event stream following graceful shutdown"
error="<nil>" module=libcontainerd namespace=moby

May 14 18:40:42 <hostname> dockerd[24866]: failed to start daemon:
Error initializing network controller: list bridge addresses failed:
PredefinedLocalScopeDefaultNetworks List:
[<list of ip's>]: no available network

The solution was simply to restart my computer.

borizzzzz
  • 165
0

Same issue here, when trying to run docker in non-root mode. According to syslog, it was a missing package.

Syslog message:

Either slirp4netns (>= v0.4.0) or vpnkit needs to be installed

The solution here was easy by installing the package slirp4netns:

sudo apt install slirp4netns