docker启动报错iptables failed: -重建docker0网络恢复

# docker启动报错

[root@localhost mysqlconf]# docker run -d -p 8080:8080 --link zookeeper:zookeeper -e dubbo.registry.address=zookeeper://172.16.160.90:2181 -e dubbo.admin.root.password=root -e dubbo.admin.guest.password=guest chenchuxin/dubbo-admin 
4948ec3b92419279f0261352a9b1e263c74d36f841d8ad6eb3b7f980b281c814
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 8080 -j DNAT --to-destination 172.17.0.3:8080 ! -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

  

搭建dubbo-admin 

docker run -d \
--name dubbo-admin \
-p 8080:8080 \
-e dubbo.registry.address=zookeeper://172.16.160.90:2181 \
-e dubbo.admin.root.password=root \
-e dubbo.admin.guest.password=guest \
chenchuxin/dubbo-admin 

  

 

posted @ 2018-07-18 15:23  amoyzhu  阅读(7324)  评论(0编辑  收藏  举报