Docker daemon is running fine, but docker just hangs indefinitely with no output when I do docker images, docker ps and so on. This wasn't happening last night and it's driving me nuts.
I reinstalled docker on my AWS Linux AMI with no luck. I have also tried sudo service docker restart and that didn't yield a fix. If anyone has run into this or has any suggestions please share.
Instance Info:
NAME="Amazon Linux AMI"
VERSION="2016.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2016.09"
PRETTY_NAME="Amazon Linux AMI 2016.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2016.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Amazon Linux AMI release 2016.09
Docker version:
Docker version 1.11.2, build b9f10c9/1.11.2
Thank you in advance!
I know this question is a bit old, but to fix this, try deleting the contents of:
/var/run/docker/libcontainerd
https://forums.docker.com/t/what-to-do-when-all-docker-commands-hang/28103/4 By korayhk:
You don’t need to reinstall or delete the container image data. Simply do below :
Stop the service first
sudo service docker stop
Clean up some of the files as mentioned in above post from Sam.
sudo rm -rf /var/run/docker
sudo rm /var/run/docker.*"
Start service now
sudo service docker start
Start your docker image
docker start <container-name>
You will receive an error when you run the docker run at first try:
Error response from daemon: invalid header field value "oci runtime error: container with id exists: 7a244b8f5d07081538042ff64aebfe11fac1a36731526e77be53db7d94dca44d\n" Error: failed to start containers:
Try running docker start command again. You will have your container up and running magically without any errors.
After updating my ubuntu to 5.8.0-34-generic. I had similar issue. after various attempts to resolve it, My final solution was to downgrade docker to the previous working version. Steps as below:
root@LT01:~# killall dockerd root@LT01:~# ps -aux | grep dockerd root@LT01:~# kill -9 your docker pid
root@LT01:/home/xyz# apt remove docker-ce docker-ce-cli containerd.io
systemctl disable docker
root@LT01:/home/xyz# apt-cache madison docker-ce
root@LT01:/home/xyz# apt install docker-ce=5:19.03.13~3-0~ubuntu-focal
apt install docker-ce=5:19.03.13~3-0~ubuntu-focal containerd.io=1.3.9-1 docker-ce-cli=5:19.03.13~3-0~ubuntu-focal
whereis docker systemctl status docker
Also, marked my docker to not upgrade on apt upgrade command.