Cannot stop or restart a docker container

前端 未结 10 1080
别跟我提以往
别跟我提以往 2021-01-30 01:54

When trying to stop or restart a docker container I\'m getting the following error message:

$ docker restart 5ba0a86f36ea
Error response from daemon: Cannot rest         


        
相关标签:
10条回答
  • 2021-01-30 02:51

    in my case, i couldn't delete container created with nomad jobs, there's no output for the docker logs <ContainerID> and, in general, it looks like frozen.

    until now the solution is: sudo service docker restart, may someone suggest better one?

    0 讨论(0)
  • 2021-01-30 02:54

    I couldn't locate boot2docker in my machine. So, I came up with something that worked for me.

    $ sudo systemctl restart docker.socket docker.service
    $ docker rm -f <container id>
    

    Check if it helps you as well.

    0 讨论(0)
  • 2021-01-30 02:54

    Check if there is any zombie process using "top" command.

    docker ps | grep <<container name>> 
    

    Get the container id.

    ps -ef | grep <<container id>>
    
    ps -ef|grep defunct | grep java
    

    And kill the container by Parent PID .

    0 讨论(0)
  • 2021-01-30 02:54

    Enjoy

    sudo aa-remove-unknown

    This is what worked for me.

    0 讨论(0)
提交回复
热议问题