docker fails to start

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


Solution 1:

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

Solution 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.