Error response from daemon: Cannot start container.......iptables failed: iptables --wait -t nat -A

转自https://www.cnblogs.com/amoyzhu/p/9329368.html

# docker启动报错
 
docker: Error response from daemon: driver failed programming external connectivity 
on endpoint happy_perlman (49dc6ee6eba3119650791b3b163da2d4c8976ec00cc45721e5cc6d6673a4a0d6): 
 (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT 
--to-destination 172.17.0.3:3306 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).
# 解决办法:重建docker0网络恢复
 
#按照进程名杀死docker进程
[root@localhost mysqlconf]# pkill docker
#清空防火墙规则-清空nat表的所有链
[root@localhost mysqlconf]# iptables -t nat -F
#查看定义规则的详细信息
[root@localhost mysqlconf]# iptables -L -n -v  
#关闭docker0接口
[root@localhost mysqlconf]# ifconfig docker0 down
#删除docker0接口
[root@localhost mysqlconf]# brctl delbr docker0
#重启docker
[root@localhost mysqlconf]# systemctl restart docker
#查看是否启用
[root@localhost mysqlconf]# docker ps -a

猜你喜欢

转载自blog.csdn.net/qq_24084605/article/details/89478712
今日推荐