记一次centos7重启后docker无法启动的问题

问题描述

在重新了centos7系统后,docker突然就启动不了了,查看报错信息

记一次centos7重启后docker无法启动的问题

[root@localhost ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 二 2020-08-04 17:33:52 CST; 3min 38s ago
Docs: http://docs.docker.com
Process: 1812 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt na tive.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/ etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, stat us=1/FAILURE)
Main PID: 1812 (code=exited, status=1/FAILURE) 8月 04 17:33:52 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
8月 04 17:33:52 localhost.localdomain dockerd-current[1812]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following d...mapper)
8月 04 17:33:52 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
8月 04 17:33:52 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
8月 04 17:33:52 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
8月 04 17:33:52 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#

查看详细报错信息

记一次centos7重启后docker无法启动的问题

[root@localhost ~]# journalctl -xe
-- The result is failed.
8月 04 17:29:16 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
8月 04 17:29:16 localhost.localdomain systemd[1]: docker.service failed.
8月 04 17:29:16 localhost.localdomain polkitd[680]: Unregistered Authentication Agent for unix-process:1595:60824 (system bus name :1.28, object path /org/freed
8月 04 17:30:12 localhost.localdomain polkitd[680]: Registered Authentication Agent for unix-process:1670:66848 (system bus name :1.29 [/usr/bin/pkttyagent --no
8月 04 17:30:12 localhost.localdomain systemd[1]: Starting Docker Storage Setup...
-- Subject: Unit docker-storage-setup.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker-storage-setup.service has begun starting up.
8月 04 17:30:12 localhost.localdomain container-storage-setup[1676]: ERROR: XFS filesystem at /var has ftype=0, cannot use overlay backend; consider different d
8月 04 17:30:12 localhost.localdomain systemd[1]: docker-storage-setup.service: main process exited, code=exited, status=1/FAILURE
8月 04 17:30:12 localhost.localdomain systemd[1]: Failed to start Docker Storage Setup.
-- Subject: Unit docker-storage-setup.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker-storage-setup.service has failed.
--
-- The result is failed.
8月 04 17:30:12 localhost.localdomain systemd[1]: Unit docker-storage-setup.service entered failed state.
8月 04 17:30:12 localhost.localdomain systemd[1]: docker-storage-setup.service failed.
8月 04 17:30:12 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
8月 04 17:30:12 localhost.localdomain dockerd-current[1723]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives a
8月 04 17:30:12 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
8月 04 17:30:12 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
8月 04 17:30:12 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
8月 04 17:30:12 localhost.localdomain systemd[1]: docker.service failed.
8月 04 17:30:12 localhost.localdomain polkitd[680]: Unregistered Authentication Agent for unix-process:1670:66848 (system bus name :1.29, object path /org/freed

解决办法

修改/etc/docker/daemon.json后缀为conf

mv /etc/docker/daemon.json /etc/docker/daemon.conf
上一篇:阿里云服务器重启后mysql不能启动的问题


下一篇:Hdu2952 Counting Sheep 2017-01-18 14:56 44人阅读 评论(0) 收藏