[root@localhost ~]# docker run -d --name lhrpg2 -h lhrpg2 -p 25432-25439:5432-5439 -v /sys/fs/cgroup:/sys/fs/cgroup --privileged=true lhrpg:1.0 /usr/sbin/init
cb8be46ff5f4e27a4521ba657a6cf622fc505ed771dd2297eeca156fa526a410
docker: Error response from daemon: driver failed programming external connectivity on endpoint lhrpg2 (71c68dc650e1025031b65dcfaf5175590e5f314956bee9c18529116092dd294b): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 25439 -j DNAT --to-destination 172.17.0.4:5439 ! -i docker0: iptables: No chain/target/match by that name.
查看iptables状态
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead) since 四 2021-12-16 11:43:36 CST; 5 days ago
Docs: man:firewalld(1)
Main PID: 780 (code=exited, status=0/SUCCESS)
12月 15 18:55:51 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D PREROUTING' failed: iptables: Bad rule (does a matching rule exist in that chain?).
12月 15 18:55:51 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D OUTPUT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
12月 15 18:55:51 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER' failed: iptables: Too many links.
12月 15 18:55:52 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION-STAGE-1' failed: iptables: Too many links.
12月 15 18:55:52 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name.
12月 15 18:55:52 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name.
12月 15 18:55:52 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule...that chain?).
12月 15 18:55:52 localhost.localdomain firewalld[780]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule...that chain?).
12月 16 11:43:35 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
12月 16 11:43:36 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
处理
service docker restart
或
systemctl restart docker
网友评论