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

Containers fail to start due to "(409 Client Error: Conflict ("Conflict. The name "<name>" is already in use by container . You have to remove (or rename) that container to be able to reuse that name."))" #3247

Closed
sangeethah opened this issue Jan 12, 2016 · 12 comments
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release status/blocker

Comments

@sangeethah
Copy link
Contributor

Server version - Build from master

Lot of container deployment failures are seen when trying to upgrade/rollback a service , reconcile a service.
This causes the service to be stuck in "Upgrading" /"Rolling-Back"/"Degraded" state for a very long time. Sometimes they are stuck forever.

Following error is seen when container deployment fails:

(409 Client Error: Conflict ("Conflict. The name "r-hello_hello123_1" is already in use by container b5e406b5dffb. You have to remove (or rename) that container to be able to reuse that name."))

screen shot 2016-01-12 at 3 40 50 pm

screen shot 2016-01-12 at 3 35 49 pm

@sangeethah sangeethah added kind/bug Issues that are defects reported by users or that we know have reached a real release status/blocker labels Jan 12, 2016
@cjellick cjellick assigned sangeethah and unassigned cjellick Jan 19, 2016
@sangeethah
Copy link
Contributor Author

Tested with v0.55.0-rc3:

This issue is not seen anymore where services are stuck in "Upgrading" /"Rolling-Back"/"Degraded" when upgrading/rollbacking/reconciling services.

@lebenitza
Copy link

Rancher Release - v0.59.1
This issue appeared again. Even if the service and its containers are deleted, unless you restart the agent on that specific host when the container is starting it gives you:

Containers fail to start due to "(409 Client Error: Conflict ("Conflict. The name "" is already in use by container . You have to remove (or rename) that container to be able to reuse that name."))".
I can confirm that the container shown in the error did not exist on the host.

Unfortunately I cannot give you more information on how to reproduce this bug.

@deniseschannon
Copy link

@manei I am unable to reproduce.

If you are launching services, it doesn't matter what host the containers are on. It's a matter of whether the same service with the same name exists in a particular stack. That's the only check that Rancher performs when adding services.

If you are adding containers to a specific host, there is no name restriction for standalone containers in Rancher.

screen shot 2016-03-11 at 10 33 23 am

I ended up looking in Docker and it looks like you might be hitting one of their open issues.
moby/moby#15311

What version of Docker are you using?

@lebenitza
Copy link

@deniseschannon thanks for the quick response
I'm using docker version 1.10.0 and it seems is actually a docker issue. It was really weird that rancher complained about not being able to deploy a container because the name it wanted to assign to it was already used by another container with an id which did not exist in docker engine.

@VAdamec
Copy link

VAdamec commented Feb 1, 2017

I'm getting same error, for Prometheus stack, config container didn't start after healthcheck fail:

2017-02-01 06:13:31,228 ERROR [:] [] [] [] [cutorService-28] [.e.s.i.ProcessInstanceDispatcherImpl] Expected state running but got stopped: Error response from daemon: Conflict. The container name "/r-Prometheus-prometheus-prom-conf-1-f3b4308f" is already in use by container c62ca816958c4705c4c8e0a2470c0ebc6406fbc5fba044b9715cd4cf2a4c4b46. You have to remove (or rename) that container to be able to reuse that name.

agent restart didn't help, only deleting.

Docker version 1.13.0, build 49bf474
Rancher version v1.3.3

@tuwid
Copy link

tuwid commented Oct 27, 2017

Still having this issue randomly on rancher 1.6.10 and docker 17.04.0-ce

@thehackercat
Copy link

Still having this issue randomly docker 18.03.1-ce

@superseb
Copy link
Contributor

This issue is almost 2.5 years old and can't be used to indicate issues with current releases. Please file a new issue with versions used and steps to reproduce so we can investigate.

@tuwid
Copy link

tuwid commented Jun 22, 2018

@thehackercat is that version even supported in rancher ?

@surendrababukandhikattu
Copy link

facing the same issue in Rancher V1.6

@surendrababukandhikattu
Copy link

surendrababukandhikattu commented Aug 8, 2019

Any resolution , please provide me..
409 conflict error , when trying to add agent to rancher server

@MouniraTlili
Copy link

Docker -> preferences -> bug icon (top right) -> clean / purge data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release status/blocker
Projects
None yet
Development

No branches or pull requests

10 participants