Docker Community Forums

Share and learn in the Docker community.

Cannot connect to docker daemon

I’m not sure what happened, all of a sudden we have an error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

However we can run docker --help and docker version.

We are running an ubuntu machine.

I tried running systemctl restart docker, but received:
Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xe” for details.

Do we have to reinstall the docker daemon?

From logs:

Apr 30 12:10:00 AdServant systemd[1]: Failed to start Docker Application Container Engine.

Apr 30 12:10:00 AdServant systemd[1]: docker.service: Unit entered failed state.

Apr 30 12:10:00 AdServant systemd[1]: docker.service: Failed with result 'exit-code’

can you try and kill docker ( if its running ) and then just run: dockerd as root ?
and see if it provides some helpfull output on the problem.