当前位置:网站首页>Docker 之MySQL 重启,提示Error response from daemon: driver failed programming external connectivity on **
Docker 之MySQL 重启,提示Error response from daemon: driver failed programming external connectivity on **
2022-06-22 15:36:00 【在奋斗的大道】
今天刚刚修改基于Docker服务的MySQL配置参数,准备重新加载MySQL 容器,提示如下截图的错误信息:
[[email protected] ~]# docker restart 7d98a59a8012
Error response from daemon: Cannot restart container 7d98a59a8012: driver failed programming external connectivity on endpoint mysql-slave (b3c4eb9f64c026a64a04183e3d54053e87078e51a64224e7cef54af3910ab7cd): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3308 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
原因:Docker容器做端口映射报错,Docker服务启动时定义的自定义链DOCKER被MySQL容器重新启动指令产生冲突;需要重新启动Docker 服务和MySQL服务,构建自定义链DOCKER.
实例:
[[email protected] ~]# docker start 1906ba6bfbe1
Error response from daemon: driver failed programming external connectivity on endpoint mysql-master (fa92e62ba50f267e1b44c499bf8318e8ddbf48705ae9b62771a15061afc8f340): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3307 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: 1906ba6bfbe1
[[email protected] ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[[email protected] ~]# systemctl restart docker
[[email protected] ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d98a59a8012 mysql:5.7 "docker-entrypoint.s…" 46 hours ago Exited (128) 2 minutes ago mysql-slave
1906ba6bfbe1 mysql:5.7 "docker-entrypoint.s…" 46 hours ago Exited (137) 8 minutes ago mysql-master
[[email protected] ~]# docker start 1906ba6bfbe1
1906ba6bfbe1
[[email protected] ~]# docker start 7d98a59a8012
7d98a59a8012
[[email protected] ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d98a59a8012 mysql:5.7 "docker-entrypoint.s…" 46 hours ago Up 2 seconds 33060/tcp, 0.0.0.0:3308->3306/tcp mysql-slave
1906ba6bfbe1 mysql:5.7 "docker-entrypoint.s…" 46 hours ago Up 23 seconds 33060/tcp, 0.0.0.0:3307->3306/tcp mysql-master
边栏推荐
猜你喜欢

Parts beyond the text are indicated by ellipsis

Make the code elegant (learn debugging + code style)

【微信小程序自定义底部tabbar】

jsp学习之(三)--------- jsp隐式对象

Qt筆記-QMap自定義鍵(key)

STM32通过DMA进行ADC采集(HAL库)

Qt笔记-QMap自定义键(key)

【阿里云服务器-安装mysql的5.6版本安装,重装】

What should I do if I can't hear a sound during a video conference?

高可用性的ResourceManager
随机推荐
Examples of MySQL account addition, deletion, modification, data import and export commands
系统吞吐量、TPS(QPS)、用户并发量、性能测试概念和公式
MYSQL_ERRNO : 1205 MESSAGE :Lock wait timeout exceeded; try restarting transacti
jMeter使用案例
STM32 ADC acquisition via DMA (HAL Library)
Simple understanding of asynchronous IO
Short video source code development, high-quality short video source code need to do what?
variable
[pop up box 2 at the bottom of wechat applet package]
面对默认导入失败的情况
[pop up box at the bottom of wechat applet package] I
试用了多款报表工具,终于找到了基于.Net 6开发的一个了
Redis实现延迟队列的正确姿势
企业级软件开发新模式:低代码
spark关于数据倾斜问题
WPF 实现星空效果
洞见科技牵头的全球「首个」IEEE隐私计算「互联互通」国际标准正式启动
Interface (optimization type annotation)
Database mysql master-slave scheme
How to open an account in flush? Is it safe to open an account online?