centos Docker无法启动,原因是“卷存储元数据数据库:超时”

0aydgbwb  于 2022-11-07  发布在  Docker
关注(0)|答案(3)|浏览(139)

我已经遵循了installation instructions of Docker CE for CentOS。最初这是工作的。在某个时候,系统被重新启动,现在启动Docker失败。感谢Maven对这件事的眼睛...
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.
e1xvtsh3

e1xvtsh31#

从此处开始: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
p1tboqfb

p1tboqfb2#

我收到这个消息时,从生产机器复制卷,结束了覆盖/var/lib/docker/volumes内的metadata.db,然后它崩溃。一个修复是如此简单

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

5n0oy7gb3#

步骤1:systemctl status docker(如果docker正在运行)停止docker。
步骤2:systemctl停止对接器。
步骤3:停靠

相关问题