43

I have followed the installation instructions of Docker CE for CentOS. Initially this worked. At some point the system was restarted and now starting Docker fails. Appreciate expert eyes on this matter...

systemctl start docker produces:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

systemctl status docker.service produces:

Apr 21 11:25:23 sec-services-build-1 systemd[1]: Starting Docker Application Container Engine...
Apr 21 11:25:23 sec-services-build-1 dockerd[9693]: time="2017-04-21T11:25:23.370390797+03:00" level=info msg="libcontainerd: previous instance of containerd still alive (8908)"
Apr 21 11:25:23 sec-services-build-1 dockerd[9693]: time="2017-04-21T11:25:23.382492171+03:00" level=warning msg="overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior. Reformat the filesystem with ftype=1 to enable d_type support. Running without d_type support will no longer be supported in Docker 17.12."
Apr 21 11:25:23 sec-services-build-1 dockerd[9693]: time="2017-04-21T11:25:23.382547668+03:00" level=info msg="[graphdriver] using prior storage driver: overlay"
Apr 21 11:25:24 sec-services-build-1 dockerd[9693]: Error starting daemon: error while opening volume store metadata database: timeout
Apr 21 11:25:24 sec-services-build-1 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 21 11:25:24 sec-services-build-1 systemd[1]: Failed to start Docker Application Container Engine.
Apr 21 11:25:24 sec-services-build-1 systemd[1]: Unit docker.service entered failed state.
Apr 21 11:25:24 sec-services-build-1 systemd[1]: docker.service failed.
Idan Adar
  • 44,156
  • 13
  • 50
  • 89

5 Answers5

101

From here: https://github.com/moby/moby/issues/22507

I ran:

ps axf | grep docker | grep -v grep | awk '{print "kill -9 " $1}' | sudo sh 

I was then able to restart docker using:

sudo systemctl start docker
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
9

Step 1: systemctl status docker (if docker is running) stop the docker.

step 2: systemctl stop docker.

step 3: dockerd

benson23
  • 16,369
  • 9
  • 19
  • 38
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 16 '22 at 11:00
8

i got this message when copying volumes from production machine, ended up to overwrite metadata.db inside /var/lib/docker/volumes, then it crashes. A fix is so simple

docker system prune --volumes -f && rm /var/lib/docker/volumes/metadata.db && docker-compose up -d
Alan Turing
  • 2,482
  • 17
  • 20
2

I encountered the same error.

❶tried

sudo kill -9 1452

multiple times, but it doesn't work. There's still a dockerd process active.

 1452 ?        Zsl  127:42 [dockerd] <defunct>

❷tried as @Artur Mustafin suggested:

sudo mv /var/lib/docker/volumes/metadata.db /var/lib/docker/volumes/metadata.db.bk

it worked.

Ryan
  • 327
  • 2
  • 6
0

so I tried all of these and nothing worked. However what worked was removing all the containers from /var/lib/docker/containers. Then i killed all docker processes (ps -ef | grep docker) then restarted docker and the docker socket. When docker became active I added the containers one at a time and 1 container was what caused the issues

obyerere
  • 11
  • 2