Docker Community Forums

Share and learn in the Docker community.

Container won't stop or be deleted


(Dougfish1) #1

I was talking to a colleague today who has a container that got into a strange state. docker ps lists the container as running, but it’s not possible to interact with the container. We tried docker stop, docker kill, docker rm we added force flags, but no luck. All attempted interactions with the container return an error message that the pid no longer exists.

Here’s one example:

$ docker stop dlm_ngs-cwb
Error response from daemon: Cannot stop container dlm_ngs-cwb: Cannot kill container 825b038b746e934625a4273b1b7719508230a10e18b85d746a954232978a2352: rpc error: code = 2 desc = containerd: process not found for container

Looking at the output of docker inspect shows an usual state:

"State": {
        "Status": "running",
        "Running": true,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 0,
        "ExitCode": 0,
        "Error": "",
        "StartedAt": "2018-05-16T17:39:10.071068103Z",
        "FinishedAt": "2018-06-05T15:26:18.894899532Z"
    },

Note that this container is Running, it has Pid 0, and it has a FinishedAt time.

Is this a known issue? Are there any suggestions on how to recover from this situation?