docker启动报错Error starting daemon: Error initializing network controller:.......Iptables not found

2022-11-21 20:31:31 浏览数 (2)

代码语言:javascript复制
[root@node02 ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2021-05-06 18:02:02 CST; 28s ago
     Docs: http://docs.docker.com
  Process: 1171 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
 Main PID: 1171 (code=exited, status=1/FAILURE)

May 06 18:02:01 node02 dockerd-current[1171]: time="2021-05-06T18:02:01.106411261 08:00" level=info msg="libcontainerd: new containerd process, pid: 1177"
May 06 18:02:02 node02 dockerd-current[1171]: time="2021-05-06T18:02:02.109999769 08:00" level=warning msg="Docker could not enable SELinux on the host system"
May 06 18:02:02 node02 dockerd-current[1171]: time="2021-05-06T18:02:02.148063708 08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
May 06 18:02:02 node02 dockerd-current[1171]: time="2021-05-06T18:02:02.148566285 08:00" level=info msg="Loading containers: start."
May 06 18:02:02 node02 dockerd-current[1171]: time="2021-05-06T18:02:02.151364623 08:00" level=info msg="Firewalld running: false"
May 06 18:02:02 node02 dockerd-current[1171]: Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain: Iptables not found
May 06 18:02:02 node02 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
May 06 18:02:02 node02 systemd[1]: Failed to start Docker Application Container Engine.
May 06 18:02:02 node02 systemd[1]: Unit docker.service entered failed state.
May 06 18:02:02 node02 systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

网上搜索大多的方法都是进行删除/var/lib/docker/network 然后进行重启 并没用

解决步骤

代码语言:javascript复制
报错结尾写明没有找到iptables
进行安装
#安装iptables
yum install -y iptables
#升级iptables
yum update iptables 
#安装iptables-services
yum install iptables-services
进行启动 成功!

0 人点赞