Tag Archives: Docker Container Start Error

[Solved] Docker Container Start Error: iptables: No chain/target/match by that name

docker run -d -p 8081:8090 ccr.ccs.tencentyun.com/bk.io/cmdb-standalone:latest
b05c9135de5b721170fcb60aaedb455309e90011c3cf5a92cbe38ef4e893ad7e
docker: Error response from daemon: driver failed programming external connectivity on endpoint epic_joliot (a8047c4842e82f901dd545f0a971de11d84ce3ea7e0bfcd1e9ca59e57dc0a2ef): (iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 8081 -j DNAT –to-destination 172.17.0.2:8090 ! -i docker0: iptables: No chain/target/match by that name.

Just look at this error: iptables: No chain/target/match by that name, you can see that it is related to iptables
Reason (guess).
If the gateway is closed when the docker service is started again, then the docker management network will not operate the network management configuration (chain docker), and then the gateway is restarted, resulting in the docker network can not be configured for the new container network, that is, no network management operation rights, do reboot processing

Solution:

service docker restart
or
systemctl restart  docker

During the deployment of docker, the CentOS 7 server started and stopped the firewalld service due to port problems. In CentOS 7, firewalld was used instead of iptables. Iptables will also be used after firewalld is started, which belongs to the relationship of reference. Therefore, when docker runs, there is no docker chain in iptables list. After restarting docker engine service, it will be added to iptables list. (it is necessary to study the docker network in depth.)

Another way:

systemctl stop firewalld
or
systemctl stop iptables

[Solved] Docker Container Start Error: OCI runtime create failed: container with ID exists

environment

System: CentOS 7.6

Docker:20.10.7

symptom

After executing the following startup command, docker start mysqlserver an exception occurs and an error is reported

1 docker start mysqlserver
2 Error response from daemon: OCI runtime create failed: container with id exists: c29c0bc9836880aa883d1ac7e50da56656ed9b2c5499831f3610d775997aa5f2: unknown
3 Error: failed to start containers: mysqlserver

Solution

 1 # Go to the following directory
 2 cd /run/docker/runtime-runc/moby
 3 
 4 # Run the ls command to see a similar display
 5 ls
 6 2901da5462f792296b36ce7e982d8ef66233fce3c78c8c150522893625768e56
 7 c29c0bc9836880aa883d1ac7e50da56656ed9b2c5499831f3610d775997aa5f2
 8 ed4c1c5e03c74b3ce4c41aafbb5f276064d51546f8359ed493b3623a0baaf648
 9 
10 # Delete folder by rm -rf command
11 # For example, delete the folder corresponding to the error id (c29c0bc9836880aa883d1ac7e50da56656ed9b2c5499831f3610d775997aa5f2) in the symptom
12 rm -rf c29c0bc9836880aa883d1ac7e50da56656ed9b2c5499831f3610d775997aa5f2/
13 
14 # Delete and re-execute the command to start the container
15 docker start mysqlserver