“docker dead but subsys locked” – error while starting docker

The Problem

The docker engine package was upgraded. After that the user is not able to start the docker service, and revert back with error “docker dead but subsys locked” on verifying the status of the service. Under normal circumstances, the general solution would be to remove the lock file and the dead files of the service. This is not applicable in this condition.

# rm /var/run/docker/execdriver/native/
# rm /var/lock/subsys/docker
# docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
# /etc/init.d/docker status
docker dead but subsys locked
# /etc/init.d/docker start
Starting docker: .......... [FAILED]
# rpm -qa | grep docker
docker-engine-1.10.3-1.0.3.el6.x86_64  
# uname -a
Linux ol65-lxc 4.1.12-37.2.2.el6uek.x86_64 #2 SMP Thu May 5 11:45:35 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
# tail -n 10 /var/log/docker
Thu Jun 16 16:42:20 IST 2016
flag provided but not defined: -d
See '/usr/bin/docker --help'.
Thu Jun 16 16:47:44 IST 2016
flag provided but not defined: -d
See '/usr/bin/docker --help'.
Thu Jun 16 16:48:34 IST 2016
flag provided but not defined: -d
See '/usr/bin/docker --help'.
Thu Jun 16 17:04:03 IST 2016

The Solution

There is a compatibility issue of the docker engine with the kernel version UEK4. The solution to the issue is to downgrade the docker-engine package to the prior version. When executing "yum list" command will only show the latest version available under the channel. To show older version can use "showduplicates" switch as shown below. Later can remove and install the package as shown.

# yum list --showduplicates | grep -i docker-engine
docker-engine.x86_64 1.10.3-1.0.3.el6 @ol6_addons
docker-engine.x86_64 1.8.2-1.0.2.el6 ol6_addons
docker-engine.x86_64 1.8.3-1.0.1.el6 ol6_addons
docker-engine.x86_64 1.9.1-1.0.1.el6 ol6_addons
docker-engine.x86_64 1.10.3-1.0.1.el6 ol6_addons
docker-engine.x86_64 1.10.3-1.0.2.el6 ol6_addons
docker-engine.x86_64 1.10.3-1.0.3.el6 ol6_addons
# yum remove docker-engine-1.10.3-1.0.3.el6.x86_64 -y
# yum install docker-engine-1.9.1-1.0.1.el6.x86_64 -y

Once completed can successfully start the service.

# /etc/init.d/docker start
Starting docker: . [ OK ]
# /etc/init.d/docker status
docker (pid 2416) is running...
# docker -d
Warning: '-d' is deprecated, it will be removed soon. See usage.
WARN[0000] please use 'docker daemon' instead.
INFO[0000] [graphdriver] using prior storage driver "btrfs"
INFO[0000] API listen on /var/run/docker.sock
INFO[0000] Firewalld running: false
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.1/16. Daemon option --bip can be used to set a preferred IP address
INFO[0000] Loading containers: start.
INFO[0000] Loading containers: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=08eb66d execdriver=native-0.2 graphdriver=btrfs version=1.9.1
Related Post