Skip to content
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

Error response from daemon: Cannot start container. iptables: No chain/target/match by that name #4778

Closed
Marketionist opened this issue Sep 11, 2015 · 13 comments

Comments

@Marketionist
Copy link

The issue: while running Docker container on Travis we are getting the error:
Error response from daemon: Cannot start container a720706eb6a09e045cb0f00005559b952f3cccee90bba8ab722665f1ea0ca71d: iptables failed: iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.1 --dport 80 -j ACCEPT: iptables: No chain/target/match by that name.

See the logs here: https://magnum.travis-ci.com/divio/intranet-product/jobs/23422946#L59

This error appears from time to time, but due to it the build fails and we have to restart it manually. Why it occurs and how can it be fixed?

@pascalgrimaud
Copy link

I got same problem.

I think the problem is the sudo service docker start at the beginning.
When I display sudo iptables -L, the "Chain DOCKER" is missing.
So, you can't start container with mapping port and the error is something like that :

iptables failed: iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.10 --dport 8080 -j ACCEPT: iptables: No chain/target/match by that name.

If I restart the docker service before running container, the "Chain DOCKER" is in iptables.
So, the container can start with mapping port.

@meatballhat
Copy link

@Marketionist @pascalgrimaud can you try adding group: edge to your .travis.yml and see if the problem persists?

@AnthonySendra
Copy link

Hello, I got same problem.
group: edge didn't fix the problem here

And since this morning, even if I try to reload the build, I have an error

@pascalgrimaud
Copy link

@meatballhat : group: edge didn't fix the problem
@AnthonySendra : can you test sudo service docker restart ; sleep 10 before running container ?

@AnthonySendra
Copy link

@pascalgrimaud your solution seems fix the problem! Thanks

stain added a commit to stain/jena-docker that referenced this issue Sep 20, 2015
thomasleveil added a commit to thomasleveil/docker-jenkins-dsl-ready that referenced this issue Sep 20, 2015
@thomasleveil
Copy link

I have the same issue with travis-worker-gce-org-prod-3:a3fa8cce-f930-4a6e-8cc7-fb2f0af843ab (testing-gce-a644fddd-a320-4d7b-8e29-91e47e694d83:travis-ci-mega-trusty-1438203722).

It was working before with ravis-worker-gce-org-prod-3: (testing-gce-34306162-bbf6-4161-9b0c-0c1fd1d780b3:travis-ci-mega-trusty-1438203722)

The sudo service docker restart ; sleep 10 workaround works for me

thomasleveil added a commit to thomasleveil/nginx-proxy that referenced this issue Sep 20, 2015
@majidgolshadi
Copy link

This error occur while you don't have a DOCKER table. so you can also use sudo iptables -N DOCKER to create it.

@alvin6666
Copy link

solution?

mcanevet added a commit to camptocamp/modulesync_configs that referenced this issue Sep 24, 2015
@arpheno
Copy link

arpheno commented Oct 1, 2015

I'm also interested in this issue. It's ironic that to use docker you'd have to use non-container based infrastructure.

fbiville added a commit to liquibase/liquigraph that referenced this issue Oct 7, 2015
fbiville added a commit to liquibase/liquigraph that referenced this issue Oct 7, 2015
thiagofigueiro added a commit to thiagofigueiro/varnish-alpine-docker that referenced this issue Oct 12, 2015
andrewsomething added a commit to andrewsomething/fabric-package-management that referenced this issue Oct 12, 2015
@elgalu
Copy link

elgalu commented Oct 13, 2015

I can recreate:
https://travis-ci.org/elgalu/pact_broker-docker/builds/85165137#L201

And indeed the sudo service docker restart ; sleep 10 works for me:
https://travis-ci.org/elgalu/pact_broker-docker/builds/85183457

@ghost
Copy link

ghost commented Dec 18, 2015

sudo service docker restart ; sleep 10 works for me too. Thanks.

@Krijger
Copy link

Krijger commented Mar 26, 2016

In case you install a newer version of Docker, the restart is automatic and should also mitigate this error.

before_install:  
  - sudo apt-get update
  - sudo apt-get install docker-engine

@stale
Copy link

stale bot commented Apr 14, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Apr 14, 2018
@stale stale bot closed this as completed Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests