docker 启动容器报错:iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 37027 -j DNAT --to-destination 172.17.0.3:27017 ! -i docker0: iptables: No chain/target/match by that name
[root@llx ~]# docker run -d --name=mongo2 -p 37027:27017 -v /home/docker/mongo2:/root mongo
6f5ee908726a9ee4ef090a0cac52178fab015cc57ab2a9fb5e2eb1cc5a983e49
docker: Error response from daemon: driver failed programming external connectivity on endpoint mongo2 (755b000f22097344328cbb36e0e7cc3f95802f14de2885710211dda1f9f234d1): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 37027 -j DNAT --to-destination 172.17.0.3:27017 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).
情况是开机启动了docker服务后,启动容器mongo,端口映射27017,因为要用navicat连接,关闭了防火墙
再次启容器mongo2报错
重启docker服务
#systemctl restart docker
再启动容器mongo2成功
转载请记录来源!!!!
https://www.cnblogs.com/leihongnu/