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.

然后查看日志內容如下:

-- 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: http://lists.freedesktop.org/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: http://lists.freedesktop.org/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服務器,問題解決!!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM