Docker

Error response from daemon: Cannot kill container: XXX: Container XXX is not running

When you are trying to stop or kill the docker container, you may get the error response like – Error response from daemon: Can not kill container:xxx: Container xxx not running.

Error response from daemon: Cannot kill container: xxx: Container xxx is not running:

I got this error when I try to kill the container, I have spent almost 30 minutes to solve this. Followed the bellow git threads but nothing helped me.

https://github.com/docker/for-linux/issues/254

https://github.com/moby/moby/issues/10589

Issue:

Error response from daemon: Cannot kill container: xxx: Container xxx is not running.

Solution:

Restart the docker.socket,docker.service and remove the docker container.

$ sudo systemctl restart docker.socket docker.service
$ docker rm {container_id}

Done!

Check your luck :)

Found a mistake or something out of date? Tell us →

Written by

chandrashekhar

Founder of onlinetutorialspoint.com. Enterprise architect with 15+ years in healthcare technology, designing and running systems on AWS and Azure. Writes about building real things with AI, local AI hardware and cloud certifications.

Keep reading

Ask a question or leave a comment

Our product

Preparing for an AWS, Azure or Google Cloud exam?

Take a free 20-question sample test with an explanation for every answer. No sign-up needed.

Start the free test