记一次系列: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

相关文章

Docker是什么Docker是 Docker.Inc 公司开源的一个基于 LXC技...
本文为原创,原始地址为:http://www.cnblogs.com/fengzheng...
镜像操作列出镜像:$ sudo docker imagesREPOSITORY TAG IMA...
本文原创,原文地址为:http://www.cnblogs.com/fengzheng/p...
在 Docker 中,如果你修改了一个容器的内容并希望将这些更改...
在Docker中,--privileged 参数给予容器内的进程几乎相同的权...