由于"卷存储元数据库,Docker无法启动:超时"

时间:2017-04-21 08:35:08

标签: docker centos

我已经关注了installation instructions of Docker CE for CentOS。最初这很有效。在某些时候系统重新启动,现在启动Docker失败。欣赏专家对此事的看法......

systemctl start docker产生:

  

docker.service的作业失败,因为控制进程退出并显示错误代码。请参阅" systemctl status docker.service"和" journalctl -xe"详情。

systemctl status docker.service产生:

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.

2 个答案:

答案 0 :(得分:18)

从这里开始:https://github.com/moby/moby/issues/22507

我跑了:

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

然后我可以使用:

重启docker
sudo systemctl start docker

答案 1 :(得分:0)

从poruction机复制卷时,我得到了此消息,最终在metadata.db内对/var/lib/docker/volumes进行了强行压缩,然后崩溃了。修复是如此之简单

docker system prune --volumes -f && rm /var/lib/docker/volumes/metadata.db && docker-compose up -d