docker17.09.1-ce 执行systemctl resart docker重启失败的问题

Posted potato-chip

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker17.09.1-ce 执行systemctl resart docker重启失败的问题相关的知识,希望对你有一定的参考价值。

记录在实际操作中碰到的docker问题

环境信息:

安装完kolla ocata版本,并且编译成功各openstack 组件的容器镜像

[[email protected] ~]# docker --version
Docker version 17.09.1-ce, build 19e2cf6

[[email protected] ~]# uname -a

Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]#

问题上下文:

执行systemctl restart docker命令,提示如下错误信息

[[email protected] ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

查看journalctl -xe|grep docker信息,报如下错误

Sep 06 23:27:13 localhost.localdomain dockerd[16753]: time="2018-09-06T23:27:13.704150779-04:00" level=info msg="libcontainerd: new containerd process, pid: 16756"
Sep 06 23:27:14 localhost.localdomain dockerd[16753]: time="2018-09-06T23:27:14.723917687-04:00" level=info msg="[graphdriver] using prior storage driver: overlay"
Sep 06 23:27:14 localhost.localdomain dockerd[16753]: Error starting daemon: layer does not exist
Sep 06 23:27:14 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit docker.service has failed
-- Unit docker.service has failed.
Sep 06 23:27:14 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Sep 06 23:27:14 localhost.localdomain systemd[1]: docker.service failed.
Sep 06 23:27:15 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.

问题解决方式:

1)卸载Docker安装包
yum remove docker*
2)清空/var/lib/docker/目录的内容(这一步必须做)
rm -rf /var/lib/docker/
3)重新安装docker
yum -y install docker-ce-17.09.1.ce
4)启动docker并查看安装的docker版本
systemctl enable docker
systemctl daemon-reload #这步是必须的,重新加载docker.service文件的配置,否则重启也是启动之前的配置。
systemctl start docker

 




以上是关于docker17.09.1-ce 执行systemctl resart docker重启失败的问题的主要内容,如果未能解决你的问题,请参考以下文章

django 无法在 docker-compose 中连接 mysql

记一次成功部署kolla-ansible ocata版本过程

docker 执行 docker system prune 导致Azure Devops build镜像失败

Ubutntu安装docker启动报Removed /etc/systemd/system/docker.service.

error: docker-runc not installed on system

无法在 docker 上执行 nvidia 运行时