微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

记一次系列:docker 启动失败

启动报错:

]# systemctl start docker
Job for docker.service Failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
To force a start use "systemctl reset-Failed docker.service" followed by "systemctl start docker.service" again.

]# journalctl  -xe
2月 25 17:48:31 host-flb systemd[1]: docker.service holdoff time over, scheduling restart.
2月 25 17:48:31 host-flb systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has finished shutting down.
2月 25 17:48:31 host-flb systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished shutting down.
2月 25 17:48:31 host-flb systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has begun shutting down.
2月 25 17:48:31 host-flb systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has begun starting up.
2月 25 17:48:31 host-flb systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
2月 25 17:48:31 host-flb 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.
2月 25 17:48:31 host-flb dockerd[29067]: unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF
2月 25 17:48:31 host-flb systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
2月 25 17:48:31 host-flb 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.
2月 25 17:48:31 host-flb systemd[1]: Unit docker.service entered Failed state.
2月 25 17:48:31 host-flb systemd[1]: docker.service Failed.

  

问题原因:

  创建了配置文件/etc/docker/daemon.json,但此文件为空

 

解决方案:

  1、删除/etc/docker/daemon.json文件,执行systemctl reset-Failed docker.service;systemctl start docker

  2、向/etc/docker/daemon.json文件中写入如下内容

  

   然后执行ystemctl reset-Failed docker.service;systemctl start docker

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐