zoukankan      html  css  js  c++  java
  • 记一次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 ~]#
    

    查看详细报错信息

    [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
    
  • 相关阅读:
    【Q&A】pytorch中的worker如何工作的
    【教程】opencv-python+yolov3实现目标检测
    ubuntu使用scrcpy手机投屏-免费神器scrcpy【介绍、安装、使用】
    【从踩坑到教程】win10下ubuntu18.04双系统UEFI模式安装、Nvidia驱动安装
    Python引用与目录结构
    交流总结
    转载-趣图展现程序员职业生涯的11个阶段
    转载-在家工作,10招助你效率、生活两不误
    转载-新年寄望:从小做起,活在当下
    转载-成为明星程序员的10个提示
  • 原文地址:https://www.cnblogs.com/anweilx/p/13431540.html
Copyright © 2011-2022 走看看