Docker dead and daemon not starting

Just upgraded from 1.5 to 1.7 on CentOS6.6 / 2.6.32-504.23.4.el6.x86_64 per the Docker install guide. Able to start, but errors abound, starting with “Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?”

root@host [1276 11:41:02 /]# service docker start
Starting docker: [ OK ]
root@host [1277 11:41:23 /]# docker images
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
root@host [1278 11:41:33 /]# service docker status
docker dead but subsys locked
root@host [1279 11:46:45 /]# service docker start
Starting docker: [ OK ]
root@host [1280 11:47:31 /]# service docker -d
Usage: /etc/init.d/docker {start|stop|status|restart|condrestart|try-restart|reload|force-reload}
root@host [1281 11:49:34 /]# docker -d
WARN[0000] You are running linux kernel version 2.6.32-504.23.4.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0.
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
ERRO[0000] Udev sync is not supported. This will lead to unexpected behavior, data loss and errors. For more information, see https://docs.docker.com/reference/commandline/cli/#daemon-storage-driver-option
ERRO[0000] [graphdriver] prior storage driver “devicemapper” failed: driver not supported
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported
root@host [1282 11:49:41 /]# docker -v
Docker version 1.7.0, build 0baf609

It seems a device-mapper issue, but no update found…

root@host [1301 12:48:31 /]# yum update device-mapper
Loaded plugins: changelog, downloadonly, fastestmirror, security
Setting up Update Process
Loading mirror speeds from cached hostfile

What is causing the issue?

1 Like

Incredibly frustrating. Now I can’t get it to stop…

root@host [1349 18:28:56 /]# service docker status
docker dead but subsys locked
root@host [1350 18:29:00 /]# service docker force-reload
Stopping docker: [FAILED]
Starting docker: [ OK ]

1 Like

Greetings,

Have you tried checking which ip/port the daemon is serving? I’m not sure how you run it. Then do something
export DOCKER_HOST=tcp://127.0.0.1:2375

1 Like

Thanks, yes. I’ve checked and have:

root@host [1363 18:58:06 /]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.0.0 U 0 0 0 docker0

1 Like

I think I might be having the same issue. docker service start yields a status of: docker dead but subsys locked and logs:

level=fatal msg="Error starting daemon: The database file is locked: database is locked" 

Right now I am starting with -g /shared/docker -p /var/run/docker.pid where /shared is an NFS mount.

The Docker daemon’s data directory needs to be on a ‘real’ partition -
typically ext4, devicemapper, btrfs or overlayfs.

It won’t work over NFS, CIFS etc.

Sven

Docker Engineer
Ask me anything …
Brisbane, Australia (UTC+10)

1 Like

Can any of the subdirectories under the -g location be located on NFS?

I would suggest adding a note in the docs about the restrictions as to where -g can point to.

1 Like

Docker expects to fully manage the -g directory - so its not advisable to
play around with the data locality and underlying filesystem inside it.

with respect to documentation - where did you look? That might give us an
idea of where adding extra caveats would help :slight_smile:

Sven

Docker Engineer
Ask me anything …
Brisbane, Australia (UTC+10)

1 Like