记一次安装docker报错的解决

用的是debian系统,安装了好几次都是启动失败,无论是在线安装,还是离线安装,还是失败。已经找到另一台服务器(centos系统),已经轻易就安装成功了。后来还是不死心,再在网上不断资料,后来发现原来是安装了防火墙firewalld所致,关闭了firewalld后就正常。

安装失败时的报错信息如下:

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
Sep 06 14:30:13 debian systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: A start job for unit docker.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit docker.service has finished with a failure.
-- 
-- The job identifier is 42059 and the job result is failed.
Sep 06 14:30:15 debian systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Sep 06 14:30:15 debian systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Automatic restarting of the unit docker.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Sep 06 14:30:15 debian systemd[1]: Stopped Docker Application Container Engine.
-- Subject: A stop job for unit docker.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A stop job for unit docker.service has finished.
-- 
-- The job identifier is 42129 and the job result is done.
Sep 06 14:30:15 debian systemd[1]: docker.service: Start request repeated too quickly.
Sep 06 14:30:15 debian systemd[1]: docker.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit docker.service has entered the 'failed' state with result 'exit-code'.

解决方法:

systemctl stop firewalld

然后重启:systemctl restart docker

记一次安装docker报错的解决

 

 参考了此文章解决的:https://www.cnblogs.com/ming369/p/10890562.html

上文的防火墙虽然与我的不一样,但给了我解决的思路

上一篇:Linux systemd启动流程


下一篇:Linux操作系统引导过程及排障详解