I have a running container that appears to be a weird state (if I attach to it, I see nothing and cannot do anything -- I have to reboot the host machine). If I try to kill it, nothing happens but if I try to restart it, docker tells me that it's not running, but I cannot remove it using docker either. This container was created by running "sudo $GOPATH/bin/docker run -i -t base /bin/bash". The commands and their output are included below:
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker ps
2013/03/27 04:40:28 docker ps
ID IMAGE COMMAND CREATED STATUS COMMENT
ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f base:latest /bin/bash 14 hours ago Up 14 hours
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker kill ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
2013/03/27 04:40:37 docker kill ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker ps
2013/03/27 04:40:38 docker ps
ID IMAGE COMMAND CREATED STATUS COMMENT
ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f base:latest /bin/bash 14 hours ago Up 14 hours
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker kill ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
2013/03/27 04:40:42 docker kill ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker restart ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
2013/03/27 04:42:53 docker restart ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
2013/03/27 04:42:53 lxc-kill: 'ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f' is not running
lxc-kill: failed to get the init pid
2013/03/27 04:42:53 Failed to send SIGTERM to the process, force killing
2013/03/27 04:43:03 Container ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f failed to exit within 10 seconds of SIGTERM - using the force
ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker ps
2013/03/27 04:43:08 docker ps
ID IMAGE COMMAND CREATED STATUS COMMENT
ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f base:latest /bin/bash 14 hours ago Up 5 seconds
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker rm ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
2013/03/27 04:43:20 docker rm ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f
2013/03/27 04:43:20 lxc-kill: 'ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f' is not running
lxc-kill: failed to get the init pid
2013/03/27 04:43:20 Failed to send SIGTERM to the process, force killing
2013/03/27 04:43:30 Container ec01013009a5611e0875630a0353466100127f114d303c876f61736f5cd68b6f failed to exit within 10 seconds of SIGTERM - using the force
might be related to #108 and #109
Something like this happened to me, but "rm" ultimately worked for me while "kill" and "stop" didn't. Did it work for you?
gottagetmac: Yes, it appears that rm eventually worked, despite the failure messages:
smountcastle@ubuntu:~$ sudo $GOPATH/bin/docker ps
2013/03/27 05:41:22 docker ps
ID IMAGE COMMAND CREATED STATUS COMMENT
sean: This seems to happen whenever the actual process stops in any way other than "docker stop" or "docker kill"鈥攜ou get a zombie container than docker thinks is alive but has no way to kill, since it's already dead.
This is actually a side effect of #257. When docker server crashed or is killed, the containers go ghost.
Refers to #257 for follow-up
Same issue. Neither stop nor kill worked for me (my container runs Meteor) . @danrobinson suggestion worked for me to: docker rm CONTAINER_ID
.
I have the same though I canneither stop
, kill
, rm
or rm -f
the container.
possibly related: https://github.com/docker/docker/issues/19166
AHHHHHHHHHHHHHHHHHHHHH
This is very annoying, even rm -f didn't do it for me.
I had to actually restart the daemon to make the container go away, in a kubernetes cluster... So you can imagine the trouble.
Hi @creack. Issue is closed but it is not clear if it was fixed and in which version? Current docker cloud can not manage its deployed applications due to this issue. Manual killing/clean up does not work so complete docker service has to be restarted.
This issue was closed more than four years ago, and the code used at the time has been largely replaced since (e.g. the entire runtime was moved out and is not handled through RunC).
If you are having an issue similar to this, and suspect it's a bug; open a new issue instead, providing the information as requested in the issue-template that was shown when you opened this issue.
docker version
docker info
I'm locking the conversation on this issue because comments on closed issues are usually overlooked, and may be unrelated to the original issue so won't help resolve the problem.
Most helpful comment
AHHHHHHHHHHHHHHHHHHHHH