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!
The docker command uses the Docker API. The Docker client can communicate with more than one daemon. When your docker command hangs unexpectedly, there maybe such problems in your system: Your computer is full of docker images, has exceeded the capacity of your computer.
Error: failed to start containers: Try running docker start command again. You will have your container up and running magically without any errors. 4 Likes All docker command line commands hang
However, docker help and docker version still work. I think there is something like a deadlock with a particular container, so commands related to containers won't complete. How to handle such a situation ?
When you run the docker build command, the Docker client will send the “context” of your Dockerfile via REST to the Docker daemon. This “context” is the content of what is in the directory of where you created the Dockerfile. In other words, Docker client is scanning all files and folders.
I know this question is a bit old, but to fix this, try deleting the contents of:
/var/run/docker/libcontainerd
I tried both of the answers by Garreth and steamfood, but didn't want to reinstall docker as Invincible suggested. I hadn't changed anything on my system so figured the problem had to be with my configuration/container setup rather than an installation problem with docker itself.
When running systemctl start docker
or anything else to start or stop the docker service, I was getting this in my logs (running systemctl status docker
in another terminal):
Loading containers: start.
Container ef06fbb157169332c453f503bb2543ce914daf54600f8fa44699fa5833d9eb90 failed to exit
It would hang after this point.
To fix this, I first killed the process identified in systemctl status docker
with sudo kill -9 $PID
.
I then deleted everything in /var/lib/docker/containers
with sudo rm -rf /var/lib/docker/containers/*
.
This cleared out the problematic container and everything worked from then on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With