Docker – All commands hanging

For some reason after reboot of system – not able to run any of docker commands.

[root@ip-172-31-35-29 run]# docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
[root@ip-172-31-35-29 run]#
[root@ip-172-31-35-29 run]# service docker start
Starting docker:        .                                  [  OK  ]
[root@ip-172-31-35-29 run]# docker ps
[root@ip-172-31-35-29 run]# docker images
[root@ip-172-31-35-29 run]#

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s