好物优选点击查看详情 京东购买

暂无内容

Docker-docke服务启动报错:Job for docker.service failed because the control process exited with error code.

启动docker服务时,报错

systemctl start docker

报错信息如下:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

使用如下命令查看

journalctl -xe

具体报错

-- Subject: Unit docker.service has begun start-up -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit docker.service has begun starting up. Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.413143675+08:00" level=info msg="Starting up" Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.419293113+08:00" level=info msg="parsed scheme: \"unix\"" module=grpc Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.419332107+08:00" level=info msg="scheme \"unix\" not registered, fallback t> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.419360075+08:00" level=info msg="ccResolverWrapper: sending update to cc: {> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.419376089+08:00" level=info msg="ClientConn switching balancer to \"pick_fi> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.427216429+08:00" level=info msg="parsed scheme: \"unix\"" module=grpc Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.427259299+08:00" level=info msg="scheme \"unix\" not registered, fallback t> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.427284956+08:00" level=info msg="ccResolverWrapper: sending update to cc: {> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.427296874+08:00" level=info msg="ClientConn switching balancer to \"pick_fi> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.428451764+08:00" level=warning msg="[graphdriver] WARNING: the devicemapper> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.511849978+08:00" level=warning msg="Usage of loopback devices is strongly d> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.754692280+08:00" level=warning msg="Base device already exists and has file> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.817524232+08:00" level=warning msg="Your kernel does not support cgroup blk> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.817575685+08:00" level=warning msg="Your kernel does not support cgroup blk> Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.817751414+08:00" level=info msg="Loading containers: start." Mar 08 08:19:27 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:27.900774440+08:00" level=info msg="Firewalld: docker zone already exists, ret> Mar 08 08:19:27 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D PREROUTING -m addrtype --dst-type LOCAL> Mar 08 08:19:28 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! -> Mar 08 08:19:28 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j > Mar 08 08:19:28 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D PREROUTING' failed: iptables: Bad rule > Mar 08 08:19:28 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D OUTPUT' failed: iptables: Bad rule (doe> Mar 08 08:19:28 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION' failed: iptables: > Mar 08 08:19:28 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION' failed: iptables: > Mar 08 08:19:29 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed:> Mar 08 08:19:29 ecs-5eb2 firewalld[2264182]: ERROR: ZONE_CONFLICT: 'docker0' already bound to a zone Mar 08 08:19:29 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:29.395932150+08:00" level=warning msg="could not create bridge network for id > Mar 08 08:19:29 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:29.396963104+08:00" level=info msg="Default bridge (docker0) is assigned with > Mar 08 08:19:29 ecs-5eb2 firewalld[2264182]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed:> Mar 08 08:19:29 ecs-5eb2 firewalld[2264182]: ERROR: ZONE_CONFLICT: 'docker0' already bound to a zone Mar 08 08:19:29 ecs-5eb2 dockerd[2264637]: time="2022-03-08T08:19:29.628987835+08:00" level=warning msg="unmountAndDeactivate: open /var/lib/doc> Mar 08 08:19:29 ecs-5eb2 dockerd[2264637]: failed to start daemon: Error initializing network controller: Error creating default "bridge" networ> Mar 08 08:19:29 ecs-5eb2 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE Mar 08 08:19:29 ecs-5eb2 systemd[1]: docker.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- The unit docker.service has entered the 'failed' state with result 'exit-code'. Mar 08 08:19:29 ecs-5eb2 systemd[1]: Failed to start Docker Application Container Engine. -- Subject: Unit docker.service has failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit docker.service has failed. -- -- The result is failed.

Docker-docke服务启动报错:Job for docker.service failed because the control process exited with error code.插图

解决办法:

一、关闭防火墙或者selinux

1、关闭防火墙

systemctl stop firewalld

2、关闭selinux

(1)查看

SELinux status: enabled就是开启的;disabled就是关闭

[root@dev-server ~]# getenforce Disabled [root@dev-server ~]# /usr/sbin/sestatus -v SELinux status: disabled

(2)临时关闭

##设置SELinux 成为permissive模式 ##setenforce 1 设置SELinux 成为enforcing模式 setenforce 0

(3)永久关闭

vi /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled;设置后需要重启才能生效

二、修改/etc/docker/daemon.json文件

{ "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] }

三、重启docker,在不行卸载docker重装;重启虚拟机

systemctl daemon-reload systemctl restart docker

最后博主有时间好好想了想查了下,博主是因为之前配置Tomcat时映射了8080端口但是还是无法访问Tomcat,因此在配置防火墙时,将docker0网卡添加到trusted域上述也存在报错信息

ERROR: ZONE_CONFLICT: 'docker0' already bound to a zone

按照下文修改,不需要关闭防火墙就可解决问题

Docker-docker服务启动报错ZONE_CONFLICT: ‘docker0‘ already bound to a zone

原文链接:https://blog.csdn.net/MinggeQingchun/article/details/123344229

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享