docker端口映射或启动容器时报错Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen
现象:
[root@localhost ~]# docker run -d -p 9000:80 centos:httpd /bin/sh -c /usr/local/bin/start.sh
d5b2bd5a7bc4895a973fe61efd051847047d26385f65c278aaa09e4fa31c4d76
docker: Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen (6bda693d1143657e46bee0300276aa05820da2b21a3d89441e820d1a274c48b6): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9000 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).
[root@localhost ~]# docker start d5b2bd5a7bc4
Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen (4127da7466709fd45695a1fbe98e13c2ac30c2a554e18fb902ef5a03ba308438): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9000 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: d5b2bd5a7bc4
原因:
docker服务启动时定义的自定义链DOCKER由于某种原因被清掉
重启docker服务及可重新生成自定义链DOCKER
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 0.0.0.0/0
MASQUERADE tcp -- 172.17.0.2 172.17.0.2 tcp dpt:8080
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8888 to:172.17.0.2:8080
root@router:playbook#iptables -t nat -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 0.0.0.0/0
MASQUERADE tcp -- 172.17.0.2 172.17.0.2 tcp dpt:8080
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8888 to:172.17.0.2:8080
解决:
重启docker服务后再启动容器
systemctl restart docker
docker start foo
参考资料:http://blog.sina.com.cn/s/blog_8ea8e9d50102wwf8.html
docker端口映射或启动容器时报错Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen的更多相关文章
- docker启动时报错Error response from daemon: driver failed programming external connectivity on endpoint *
公司服务器由于断电重启,部署在docker服务上的一些web服务需要重新开启容器, [root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND C ...
- docker端口映射启动报错Error response from daemon: driver failed programming external connectivity on endpoint jms_guacamole
问题描述:今天跳板机的一个guacamole用docker重新启动报错了 [root@localhost opt]# docker start d82e9c342a Error response / ...
- docker 报错 Error response from daemon: driver failed programming external connectivity on endpoint mynginx
Error response from daemon: driver failed programming external connectivity on endpoint mynginx (7d1 ...
- docker报错Error response from daemon: driver failed programming external connectivity on endpoint *
服务端 通常会显示 port xxx allocated的,意思就是 xxx 端口被占用了. 如果报port allocated端口占用,就docker ps 查看正使用的镜像,docker kill ...
- 【docker】docker启动、重启、关闭命令,附带:docker启动容器报错:docker: Error response from daemon: driver failed programming external connectivity on endpoint es2-node
在关闭并放置centos 的防火墙重启之后[操作:https://www.cnblogs.com/sxdcgaq8080/p/10032829.html] 启动docker容器就发现开始报错: [ro ...
- 运行容器出现docker: Error response from daemon: driver failed programming external connectivity on endpoint elegant_ptolemy (7fe85ca6bd744449ff82b81c1577d73b6821c4e51780c8238fad6aa0cb940522): (iptables fai
运行容器时出现以下报错: docker: Error response from daemon: driver failed programming external connectivity on ...
- 解决Docker容器 iptables问题---docker: Error response from daemon: driver failed programming external connectivity on endpoint quizzical_thompson
一.问题现象 最近在研究Docker容器日志管理时,启动容器出现iptables相关报错,具体问题如下 运行容器 [root@node-11 ~]# docker run -d -p 24224:24 ...
- Docker Desktop: Error response from daemon: driver failed programming external connectivity on endpoint xxx 问题
右击任务栏 Docker 图标 `Restart` 或 `Quit Docker Deskto` 后之前正常的 zookeeper 容器不会自动启动 通过命令 docker start zk1 启动报 ...
- docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley
1. docker 启动image错误 docker: Error response from daemon: driver failed programming external connectiv ...
随机推荐
- [Http] Understand what an HTTP Request is
Let's look at several HTTP requests to learn the basic structure of these messages, and how the vari ...
- Facebook Hacker Cup 2015 Round 1--Winning at Sports(动态规划)
原题:pid=688426044611322&round=344496159068801">https://www.facebook.com/hackercup/problem ...
- php资源集
php资源集 一.php资源网站 1.php中文网(js特效,模板,软件工具下载,课程) www.php.cn js特效下载_js特效代码_js特效大全-php中文网免费下载站http://www.p ...
- Android onKeyDown监听返回键无效
当我们的Activity继承了TabActivity,在该类中重写onKeyDown是监听不到返回键的, 具体解决方法如下: 重写dispatchKeyEvent /** * 退出 */ @Overr ...
- Warning: file_put_contents(常用单词1.txt): failed to open stream: Invalid argument in
Warning: file_put_contents(常用单词1.txt): failed to open stream: Invalid argument in 一.总结 1.上述问题是因为Win ...
- MONyog使用图解(一)-数据库性能监控工具
原文:MONyog使用图解(一)-数据库性能监控工具 一.安装步骤 较为简单,网上可以搜索到,此处不做详细说明. 二.使用图解 此处介绍监控数据库连接量.并发量.吞吐量.响应时间等功能 1.设置连接需 ...
- CSS盒子模型中距离的通俗解释
设一个有两个div,一大一小,小的div在大的div里面,而小的div和大div直接的距离就叫外边距,用margin.margin-left.margin-right.margin-top.margi ...
- 中国象棋V2:Java源代码、毕业设计等所有文档,已经全部提交到CSDN-Code平台
下载地址:https://code.csdn.net/FansUnion/chinesechess-v2 主要内容:Java源代码.毕业设计.API文档.声音图片等资源.Demo截图等一切的一切. 2 ...
- 【网络】无法解析服务器的DNS地址?;能登陆QQ,无法打开网页
1. 无法解析服务器的DNS地址 手动设置 DNS(域名解析服务器) 8.8.8.8 114.114.114.114 清除浏览器缓存: 重启主机: 无法解析服务器的DNS地址?DNS解析错误怎么办? ...
- 【codeforces 782D】 Innokenty and a Football League
[题目链接]:http://codeforces.com/contest/782 [题意] 每个队名有两种选择, 然后第一个选择队名相同的那些队只能选第二种; 让你安排队名 [题解] 首先全都选成第一 ...