Docker container not stopping

What is the problem ?

root@hero:/home/intra# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b7f12c671a23 owasp/zap2docker-stable "zap-webswing.sh" 25 minutes ago Up 25 minutes (unhealthy) 0.0.0.0:8080->8080/tcp, 0.0.0.0:8090->8090/tcp quizzical_bartik
root@hero:/home/intra# docker stop b7f12c671a23
Error response from daemon: cannot stop container: b7f12c671a23: Cannot kill container b7f12c671a23517a2c76c02e28a08af34fbe68a6709a09f5a303182656cb7c4d: unknown error after kill: runc did not terminate sucessfully: container_linux.go:388: signaling init process caused "permission denied"
: unknown
root@hero:/home/intra# 
1

4 Answers

Initially I installed docker with snap, but encountered issues and completely removed it, and then installed with apt from docker repository. But it turned out I hadn't removed it completely.

Actually Ahmet did found the correct solution, I'm posting my answer just to show the formatted output for sudo aa-remove-unknown:

$ sudo aa-remove-unknown
Removing 'docker-default'
Removing 'snap-update-ns.docker'
Removing 'snap.docker.compose'
Removing 'snap.docker.docker'
Removing 'snap.docker.dockerd'
Removing 'snap.docker.help'
Removing 'snap.docker.hook.install'
Removing 'snap.docker.hook.post-refresh'
Removing 'snap.docker.machine'

For me it was solved by running

sudo aa-remove-unknown
sudo systemctl restart docker.service

The first part was suggested here, the second part I found on another forum.

It appears something has gotten into an invalid state, possibly a bug in dockerd, containerd, or runc. Upgrade to the current stable release and restart the docker daemon (typically systemctl restart docker).

I found a fix for this problem,use this command and later run docker kill for containers..

sudo aa-remove-unknown

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like