moby: Cannot stop container XXXXXXXXXXXX: [2] Container does not exist: container destroyed
Docker fails to stop a container:
root@haswell:/home/supervisor# docker ps | grep e16
e16c5c80ab4e ernetas/local:latest "/sbin/my_init -- /b 10 days ago Up 3 minutes romantic_kirch
root@haswell:/home/supervisor# docker stop e16c5c80ab4e
Error response from daemon: Cannot stop container e16c5c80ab4e: [2] Container does not exist: container destroyed
FATA[0000] Error: failed to stop one or more containers
root@haswell:/home/supervisor#
Docker version and info:
supervisor@haswell:~$ sudo docker -D info
Containers: 8
Images: 40
Storage Driver: aufs
Root Dir: /storage2/docker/aufs
Backing Filesystem: extfs
Dirs: 56
Dirperm1 Supported: false
Execution Driver: native-0.2
Kernel Version: 3.13.0-45-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 4
Total Memory: 31.35 GiB
Name: haswell
ID: T2LH:VCTV:CZGW:WBD6:7FQ6:TNLY:BEB4:ATGH:CBZZ:FEPU:JTRY:XNVQ
Debug mode (server): false
Debug mode (client): true
Fds: 35
Goroutines: 73
System Time: Fri Apr 24 11:45:27 EEST 2015
EventsListeners: 0
Init SHA1: 9145575052383dbf64cede3bac278606472e027c
Init Path: /usr/bin/docker
Docker Root Dir: /storage2/docker
supervisor@haswell:~$ sudo docker -D version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 4749651
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 4749651
OS/Arch (server): linux/amd64
supervisor@haswell:~$
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 121 (60 by maintainers)
Commits related to this issue
- Ignore failure to kill container in test tear down Docker 1.6 sometimes fails to kill a container because it disappears. https://github.com/docker/docker/issues/12738 Ignore these failures. — committed to spotify/docker-client by davidxia 9 years ago
- Workaround Docker's "container destroyed" When a container exists right around when Docker was attempting to restart it, it might get into an awkward state that makes it impossible to restart. Resolv... — committed to krallin/captain-comeback by krallin 8 years ago
- Workaround Docker's "container destroyed" When a container exists right around when Docker was attempting to restart it, it might get into an awkward state that makes it impossible to restart. Resolv... — committed to krallin/captain-comeback by krallin 8 years ago
We had the same problem here today. The comment of @mpalmer did help a lot but not completely. We found out that you can do the following:
If you’ve got a container that just won’t die after you
docker rm -f
it, you can force-nuke it withWhere
<shortID>
is the blob of hex that identifies the container indocker ps
.It’s not a fix, but it’s an effective workaround.
Did not work for us. The
lscgroup | grep <ID> | xargs cgdelete
command did delete the entries form lscgroup, but the container ist still in
docker ps
and all the 3 steps from @SirUrban did just fail as usualContainer does not exist: container destroyed
.Docker engine restart fixes the problem for us, but this is not an acceptable workaround.
Just as an addition to the cases before. We triggered it a couple of times with using
docker-compose up ..."
and then killed it with doubleCTRL-C
.for the record:
@thaJeztah Ok fine.
@suchakra012 please don’t comment on closed issues with unrelated questions; if you suspect there’s a bug, open a new issue; for questions about running docker, either https://forums.docker.com, the #docker IRC channel, or StackOverflow are probably better
I think this steps will fix the ‘Destroyed Container’ 1. Try to stop all the container in the host. ( kill new process in containers) 2. Stop the docker daemon, 3. kill all the processes escaped from container which PPID is 1. 4. start your docker daemon.