New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot start container: exit status 4 #12547
Comments
None of the containers have ports bound to the host, but they all expose at least one port. From the dockerd log I looked over the code, and from what I can tell, this exit status comes from an iptables command. |
+/system/networking I believe this is related to the problem described in #10218 (comment) http://patchwork.ozlabs.org/patch/287955/ suggests "exit status 4" from iptables is related to a concurrency issues (exactly what we're seeing here), and might be recoverable. I'll try to dig in further. |
I am expieriencing the same issue on a testing server where I run several tests in parallel i.e. starting many docker containers simulatinously. docker run --rm=true -v /var/lib/jenkins/jobs/dev-master:/opt/test --link cd2d1333d290f2a27228189ec52cda6ce153c54bec3e6c57d5b2a67b8cec4418:postgres yiitest/php:master phpunit --verbose --color results in
Here is a gist of syslog at that time, there is pretty much going on but nothing I think is related because I see the same logging even if all containers run fine. https://gist.github.com/cebe/73190a21cacd37a92581 docker version
let me know if you need further input. |
I was able to workaround this issue for now. I did that by removing all |
@dnephin So, do you use just iptables without other firewalls? |
@LK4D4 I'm not quite sure what you mean. These containers are being used as part of a test suite, so they aren't really being exposed to anything public. We aren't doing anything except for what docker is doing to setup the networking. The hosts shouldn't be running any other firewall, just iptables. |
@dnephin Yes, that's what I'm asked. Thanks! |
@dnephin thanks for the hint, I was not aware that this was possible without EXPOSE. |
I've been able to reproduce the issue on Docker 1.11 by running the following script in a background:
and the But I wasn't able to reproduce it with 1.12 and 1.13. Does it mean that the issue was addressed in these versions? |
As of iptables version 1.6.2, Put it another way: More points to consider:
|
Test fails intermittently because dind container fails to come up. The issue appears to be a docker problem where it tries to modify iptables rules and gets error code 4, similar to this bug: moby/moby#12547 Fix is to retry starting the container using restartPolicy.
Let me close this ticket for now, as it looks like it went stale. |
We have a build system which runs across many hosts, and runs 20+ concurrent builds per host. Each build will start/stop a few docker containers.
We're consistently hitting this error trying to start containers, it happens on roughly 5% of the builds. We tried adding a retry to the "start container" API call (5 tries with exponential backoff up to 15s) , but that didn't resolve the issue.
Earlier related issues: #8912, #6010
docker version
docker info (from one random host, they should all be pretty similar)
client request log
dockerd log
The text was updated successfully, but these errors were encountered: