Debian Jessie Install Problem

Hi. I’m following these installation instructions for Debian Jessie: https://docs.docker.com/install/linux/docker-ce/debian/

But I’m getting this error:

root# apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  docker-ce
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/30.2 MB of archives.
After this operation, 152 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 46122 files and directories currently installed.)
Preparing to unpack .../docker-ce_17.12.1~ce-0~debian_amd64.deb ...
Unpacking docker-ce (17.12.1~ce-0~debian) ...
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up docker-ce (17.12.1~ce-0~debian) ...
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript docker, action "start" failed.
dpkg: error processing package docker-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (215-17+deb8u7) ...
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I run systemctl status docker.service I’m getting this:

root# systemctl status docker.service
  docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled)
   Active: failed (Result: start-limit) since Tue 2018-03-20 10:52:55 CET; 3min 12s ago
     Docs: https://docs.docker.com
  Process: 1962 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 1962 (code=exited, status=1/FAILURE)

Mar 20 10:52:54 systemd[1]: Failed to start Docker Application Container Engine.
Mar 20 10:52:54 systemd[1]: Unit docker.service entered failed state.
Mar 20 10:52:55 systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 20 10:52:55 systemd[1]: Stopping Docker Application Container Engine...
Mar 20 10:52:55 systemd[1]: Starting Docker Application Container Engine...
Mar 20 10:52:55 systemd[1]: docker.service start request repeated too quickly, refusing to start.
Mar 20 10:52:55 systemd[1]: Failed to start Docker Application Container Engine.
Mar 20 10:52:55 systemd[1]: Unit docker.service entered failed state.

What can I do to fix this problem?


Update: I don’t know why, but sometimes journalctl -f -u docker.service only prints a few lines, when I run systemctl start docker.service:

Mar 20 13:47:09 systemd[1]: Stopping Docker Application Container Engine...
Mar 20 13:47:09 systemd[1]: Starting Docker Application Container Engine...
Mar 20 13:47:09 systemd[1]: docker.service start request repeated too quickly, refusing to start.
Mar 20 13:47:09 systemd[1]: Failed to start Docker Application Container Engine.
Mar 20 13:47:09 systemd[1]: Unit docker.service entered failed state.

But sometimes more.

Then I saw this line:

dockerd[6165]: Error starting daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: aufs, devicemapper; Please cleanup or explicitly choose storage driver (-s <DRIVER>)

I ran the following which has fixed my issue:

root# apt-get purge docker-ce
root# rm -rf /var/lib/docker
root# apt-get install docker-ce

Hi, I had the same issue installing on Ubuntu 18.04 (Kubuntu flavour).
I’m sure you’ve resolved it by now, but for anyone who happens to come across this…
I asked around and it’s a common issue, solution is straightforward => Restart the host (in my case my machine). Simple as that.