moby: Cannot start container: [0] Id already in use
Can’t start existing docker container with mongodb.
docker ps -a
shows that this container exists:
6d33bbf4bce9 mongo:latest "/entrypoint.sh mongo" 47 minutes ago Exited (-1) 22 minutes ago hotels-mongo
And when i start it with docker start hotels-mongo
, this exception throws:
Error response from daemon: Cannot start container hotels-mongo: [0] Id already in use: Container with id exists: 6d33bbf4bce902279721419a062bcd7d2ddcffdd8ef13d70bcd5e7ae71cf5c10
Error: failed to start containers: [hotels-mongo]
Also can’t start through kitematic. This container worked for 2-4 weeks and now it doesn’t.
Docker version: Client: Version: 1.8.3 API version: 1.20
Server: Version: 1.9.1 API version: 1.21
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (6 by maintainers)
i got that problem also, and my solution is very simple
docker-compose down -v
thendocker-compose up -d
again.Just found a manual workaround, all it needs is to delete the following directory: /run/docker/execdriver/native/dockerID. For instance, in my case:
For me, restarting the machine solved the problem
Thanks! That worked for me!
We’re experiencing this issue where we need to rm the
/run/docker/runtime-runc/moby/<containerid>
directory when the container is stopped in order to start it up again due to the error message:OCI runtime create failed: container with id exists: <containerid>: unknown
We do not have a reliable way to repro this behavior, but it does happen very often in our rather large environment (more than 30 impacted containers out of 900+).
Restarting
dockerd
or the server itself is not an option for us, any suggestions? I’d be happy to help create a patch if there’s any ideas where to start looking.Have the same issue
I had daily reboots enabled on one of my webservers (Ubuntu 18.04.1). On SOME boots, the containers are not startet. I called
service docker restart
several times - and after third call the starting was successful.Previous log entries:
At time of the log entries NO containers were up…
I just had this issue on 1.13.1 immediately after upgrading, I can’t start some (not all) of my containers.
A reboot of Ubuntu fixed it.
Closing this since this is not a valid error since at least 1.11… I think it may even be cleared up by 1.10… but definitely at least 1.11.
Docker does not itself execute containers anymore since 1.11 and relies on
runc
from OCI. There is noexecdriver
anymore. The error itself was fixed in libcontainer (which OCI uses) awhile back and the error itself doesn’t exist anymore.If you run into more issues, please open a new one. Thanks!