Dokcer网络问题

因为操作或修该过iptables导致docker容器出现如下错误:

[root@mysqlserver ~]# docker restart cvnavi-centos-tomcat-20170814
Error response from daemon: Cannot restart container cvnavi-centos-tomcat-20170814: iptables failed: iptables -t nat -A DOCKER -p tcp -d 0/0 --dport 18091 -j DNAT --to-destination 172.17.0.3:8080 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)
Error: failed to restart containers: [cvnavi-centos-tomcat-20170814]

修复时先停掉宿主机上运行的docker容器,然后执行以下命令:

pkill docker 

iptables -t nat -F 

ifconfig docker0 down 

brctl delbr docker0 

docker -d 

systmctl restart docker
重启docker问题即可解决。
 

Docker之间通信

最简单的方法,关闭防火墙(只建议用于开发环境)

 systemctl stop firewalld

Docker iptables failed: iptables -t nat -A DOCKER -p tcp的更多相关文章

  1. iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8001 -j DNAT --to-destination 172.17.0.5:8080 ! -i docker0: iptables: No chain/target/match by that name.

    在docker容器上部署项目后,启动docker容器,出现 iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dpor ...

  2. 【Docker】iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8480 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name

    启动容器的时候,出现如下错误: Error response / --dport -j DNAT --to-destination ! -i docker0: iptables: No chain/t ...

  3. iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT --to-destination

    启动docker容器时报错: iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT ...

  4. docker启动报错 (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport

    今天修改完docker宿主机的防火墙文件 vim /etc/sysconfig/iptables 停止容器再启动时 报如下错误 (iptables failed: iptables --wait -t ...

  5. iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name

    今天使用docker运行mysql时报错, 执行命令: docker run --restart=always --name mysql5.7 -p 3306:3306 -v /data/mysql/ ...

  6. Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-b1938128a963

    报错信息:Failed to Setup IP tables: Unable to enable SKIP DNAT rule:  (iptables failed: iptables --wait ...

  7. Error response from daemon: driver failed programming external connectivity on endpoint httptest (9bb351e8d0738501ae2c57d1bfe3b18aced708d9dc66a63f642c5918cb144340): (iptables failed: iptables --wait

    来自守护程序的错误响应:驱动程序未能在终结点httptest上对外部连接进行编程 解决方法: [root@localhost ~]# pkill docker [root@localhost ~]# ...

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

    # docker启动报错 [root@localhost mysqlconf]# docker run -d -p 8080:8080 --link zookeeper:zookeeper -e du ...

  9. docker启动容器报错:iptables failed

    问题描述: 启动Docker容器的时候 Error response / --dport -j DNAT --to-destination ! -i docker0: iptables: No cha ...

随机推荐

  1. Pom报错

    maven的pom报plugins错误的解决方法 maven的pom报plugins错误的解决方法. 引用 Failure to transfer org.apache.maven.plugins:m ...

  2. 如何使用python下载网站上的视频

    youtube-dl 从名字上也能看出来,是专门用来下载YouTube的视频. 不过本人对YouTube不感兴趣,但是这个模块可以用来下载bilibili上的视频我们就来试一试 首先pip insta ...

  3. c语言自动对齐原则

    转载一篇博客: http://blog.csdn.net/hairetz/article/details/4084088 1:数据成员对齐规则:结构(struct)(或联合(union))的数据成员, ...

  4. Visual Studio 2013下我常用的两个插件

    随手记一下,我比较常用的两个插件,抛砖引玉. 代码高亮显示:SelectionHighlight.vsix 虚线插件:Indent Guides.vsix

  5. sersync+rsync作实时同事

    http://liubao0312.blog.51cto.com/2213529/1677586 配置搞定,参照上面的文章,用时搞一搞就OK. 注意IPTABLES的配置及环境变量 最简陋配置: rs ...

  6. [BZOJ1017][JSOI2008]魔兽地图DotR 树形dp

    1017: [JSOI2008]魔兽地图DotR Time Limit: 30 Sec  Memory Limit: 162 MBSubmit: 2597  Solved: 1010[Submit][ ...

  7. 在libGDX中使用Spine骨骼动画

    首先,github是个宝库,实践流的读者可以直接看例子进行学习 1.这是Spine官方给出的例子 https://github.com/EsotericSoftware/spine-superspin ...

  8. (4)oracle连接工具和配置监听

    一.SQL PLUS sql plus 是oracle最常用的命令行工具,启动sqlplus工具的方法有两种 1. 是在安装好的oracle开始程序的路径下运行程序 点击运行弹出此界面 2 .是在cm ...

  9. unity3d Billboard

    CameraFacingBillboard   CameraFacingBillboard From Unify Community Wiki   Jump to: navigation, searc ...

  10. 3.非标准的NDEF格式数据解析--IsoDep

    1.使用目的:正常开发是针对NDEF格式数据进行开发,但实际情况并非如此,以厦门公交卡为例,厦门公交卡保存的是非NDEF格式数据.其类型是IsoDep类型. 2.非标准的NDEF格式数据流程:当厦门公 ...