REDHAT7.2解决docker启动失败问题
问题:
[root@localhost ~]# service docker restart
Redirecting to /bin/systemctl restart docker.service
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
然后查看⽇志内容如下:
exited-- Unit docker.service has begun starting up.
9⽉ 20 15:23:49 localhost.localdomain dockerd[2591]: unable to configure the Docker daemon with file /etc/docker/daemon.json: unexpected EOF
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: /mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: docker.service failed.
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: /mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-
- The result is failed.
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
9⽉ 20 15:23:49 localhost.localdomain systemd[1]: docker.service failed.
解决办法:
vim /etc/docker/daemon.json
{ "storage-driver": "devicemapper" }
上⾯内容写⼊到这个⽂件,重启docker服务器,问题解决!!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论