[Solved] Error response from daemon: driver failed programming external connectivity on endpoint mysql

Error response from daemon: driver failed programming external connectivity on endpoint mysql (0b3324391f54cd0137ff7a9da6ed145656b187dfb984d507ca62252a54d47245): (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.

 

Error reproduction: After starting mysql, close the firewall, and then restart mysql (docker restart mysql), the above error occurs.

Reason: After we start Docker, we operate the firewall firewalld, and the above error will occur

Solution: restart docker (systemctl restart docker), restart docker service and regenerate custom chain DOCKER

Why can it be solved:

The custom chain DOCKER defined when the docker service starts, when the centos7 firewall is cleared,

The bottom layer of firewall is to use iptables for data filtering, which is built on top of iptables, which may conflict with Docker.

firewalld Rules that will be removed from iptables  when  starting or restarting DOCKER , thus affecting the normal working of Docker.

When you are using Systemd, it  firewalld will start before Docker, but if you operate after Docker has started  firewalld , you will need to restart the Docker process.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *