Error “Cannot connect to the Docker daemon. Is 'docker -d' running on this host?” after upgrade Linux kernel
I am using Ubuntu 14.04 with docker v1.8.2. Docker works well before. Then I just upgraded my Linux kernel from 3.16 to 4.05 and now docker is broken.
simlw@sim-lw:~$ docker images Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
ps auxww | grep docker
simlw@sim-lw:~$ ps auxww | grep docker simlw 23085 0.0 0.0 15976 2276 pts/24 S+ 13:12 0:00 grep --color=auto docker
sudo docker -d
simlw@sim-lw:~$ sudo docker -d Warning: '-d' is deprecated, it will be removed soon. See usage. WARN please use 'docker daemon' instead. INFO Listening for HTTP on unix (/var/run/docker.sock) ERRO [graphdriver] prior storage driver "aufs" failed: driver not supported FATA Error starting daemon: error initializing graphdriver: driver not supported
Does anybody know how to resolve this? thanks in advance.
Pleae note I’ve already read Cannot connect to the Docker daemon. Is 'docker -d' running on this host? and Docker Daemon not running, and both of them don’t help me out.
2 Solutions collect form web for “Error “Cannot connect to the Docker daemon. Is 'docker -d' running on this host?” after upgrade Linux kernel”
Ubuntu dropped support for AUFS since its Kernel package version 3.18, because from that version OverlayFS is part of Linux Kernel. I think your docker daemon is trying to use AUFS driver because you have a
/var/lib/docker/aufs folder. Anyway, you can force to use the correct storage driver using the
--storage-driver= option when running the docker daemon.
So first, to test that the daemon works with the OverlayFS storage driver, run the daemon in a terminal:
sudo docker daemon -s overlay. Once you have tested it is working correctly, you can modify it permanently editing the file
/etc/default/docker, adding the next line:
# Force OverlayFS for storage driver DOCKER_OPTS="$DOCKER_OPTS -s overlay"
I upgraded from Debian Jessie to testing and I’m now using linux-image-4.2 and I encountered the same kind of issue with a missing aufs driver.
A quick fix is to delete the docker aufs folder. You might lose some data, so please do it with care!
sudo rm -rf /var/lib/docker/aufs