iptables failed: iptables --wait -t nat -A DOCKER
今天tomcat的docker容器挂了,只要是带命令-p映射端口就起不来并且报错:
Error response from daemon: Cannot start container eb9d501f56bc142d9bf75ddfc7ad88383b7388ca6a5959309af2165f1fff6292: iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8081 -j DNAT --to-destination
172.17.0.164:8080 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)
网上查找发现,可能是网络问题造成
首先先验证docker容器内部网络是否能ping通宿主机
如果能ping通,即可通过重建docker0网络恢复
先停掉宿主机上运行的docker容器,然后执行以下命令
在宿主机执行:
- pkill docker
- iptables -t nat -F
- ifconfig docker0 down
- brctl delbr docker0
- docker -d
- systemctl restart docker重启docker服务
问题即可解决。。
备注iptables的配置文件路径 vim /etc/sysconfig/iptables
iptables命令:
systemctl start iptables #启动
systemctl status iptables #查看运行状态
systemctl restart iptables.service #重启
systemctl stop iptables.service #停止
systemctl enable iptables.service #设置开机启动
systemctl disable iptables.service #禁止开机启动
iptables failed: iptables --wait -t nat -A DOCKER相关推荐
- 启动docker容器时报错:iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT -
启动docker容器时报错: iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT ...
- docker启动报错 (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9876 -j DNAT --
docker启动报错 : (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9876 -j DNAT ...
- dockerq启动报错(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9876 -j DNAT --t
docker启动报错 (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9876 -j DNAT --t ...
- iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9443 -j DNAT
docker启动容器的时候报错: Error response from daemon: driver failed programming external connectivity on endp ...
- 启动容器时报错:iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 1217 -j DNAT --to-de
故障原因: 利用tomct镜像启动容器时报错: [root@localhost Tomcat]# docker run -d --name tomcat2 -p 1217:8080 tomcat:ce ...
- 启动 docker 容器报错 (iptables failed: iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0
前言 centos7 phpstudy 1.2 linux 版 启动 docker 容器报错 shell> docker start nexus3 Error response from dae ...
- iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 81 -j DNAT --to-destination
刚在docker-compose上配置了数据源,重新启动nginx时报错, 重新启动docker,重启docker之前务必记录其他容器状态,防止重启docker对其他容器产生影响 systemctl ...
- Iptables(2) - iptables命令的基本用法
一.iptables命令 iptables是一个规则管理工具. 具有添加.修改.删除和显示等功能. 规则和链都有计数器: pkts: 由规则或链所匹配到的报文的个数 bytes: 由规则或链匹配到的所 ...
- php zhxing iptables,Linux iptables 扩展 ipset 使用教程
iptables介绍 Iptables是在linux内核里配置防火墙规则的用户空间工具,它实际上是netfilter框架的一部分.可能因为iptables是netfilter框架里最常见的部分,所以这 ...
- iptables学习笔记:使用NAT实现简单的无线AP
之前使用的是无线路由让手机上网.学习了iptables后,尝试在非openwrt系统的Linux上实现相同功能.本文简单记录一下. 手上有块X86的板子,上面安装了Linux系统.几个月前研究了WIF ...
最新文章
- vim替换字符串带斜杠_Vim、gvim操作替换
- 893B. Beautiful Divisors#美丽的因子(打表法)
- OEMAddressTable介绍
- 记录 之 离线安装docker
- 中点击按钮新建widget_iOS 14-Widget开发
- 【树链剖分】春季大扫除(P6805)
- Jax-RS自定义异常处理
- 文字层一点就变红_学习观察神经网络:可视化整个模型训练中卷积层的激活
- android全局livedata,Android 使用ViewModel,LiveData高效、简
- append从一个添加到另一_小米的另一妙用,制作小米锅巴,吃着嘎嘣脆,一口一个香得很...
- 转 常量指针和指针常量的区别详解
- DOS 批处理高级教程精选合编20080331
- Oracle 应用篇+Oracle Siebel CRM
- 番茄钟怎么调_实操番茄钟使用方法
- DELPHI Webbrowser 响应回车键(EWB响应正常,无需额外代码)
- 关于数据库事务隔离级别的介绍
- selenium+requests实现自动连接校园网并验证!
- S-Transform
- SQL-3(数据筛选)
- 编译原理-递归下降分析器