问题:
Error response from daemon: driver failed programming external connectivity
on endpoint jenkins (a8ea15bf9b3dbed599d059d638f79f9dd5e875556c39bfb41e6563d3feedb81b):
(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 50000 -j DNAT
--to-destination 172.18.0.6:50000 ! -i br-031aa3930383: iptables: No chain/target/match
by that name.
光看这个报错: iptables: No chain/target/match by that name,就能够看出是跟iptables有关
处理:
systemctl restart docker
使用的centos7服务器,在部署docker的过程中,因端口问题有启停firewalld服务,在centos7里使用firewalld代替了iptables。在启动firewalld之后,iptables还会被使用,属于引用的关系。所以在docker run的时候,iptables list里没有docker chain,重启docker engine服务后会被加入到iptables list里面。(有必要深入研究一下docker network)
博客围绕CentOS7服务器部署Docker时出现的iptables报错展开。报错信息为“iptables: No chain/target/match by that name”,原因是CentOS7用firewalld代替iptables,启动firewalld后iptables仍被引用。处理方法是重启docker engine服务,将docker chain加入到iptables list。
3万+

被折叠的 条评论
为什么被折叠?



