Error starting daemon: No such container

I cannot start the docker daemon, because it tries to run a bogus container. However I cannot remove the container because the daemon is not running. Seems like a vicious circle. Is there a manual workaround?

time=“2016-07-19T21:48:01.620972364Z” level=fatal msg=“Error starting daemon: No such container: 62b4ec020a57ca4f0438fbedb81ab23fba02c8292274ff63ae7146c30dddbe40”

I got here by upgrading docker from 1.11.1 to 1.11.2 on my AWS instance. No problems before the upgrade. I tried downgrading back to 1.11.1 but the same issue remains when trying to start the docker daemon. So this problem may not be related to the version.

$ sudo service docker status
docker dead but subsys locked

Any suggestions appreciated.

A long time ago I was having Docker gremlins like this with the CentOS 6 kernel and devicemapper, and a reliable if brutal fix was to rm -rf /var/lib/docker and reload my images.

What host OS and Linux kernel are you using?

I am running an AWS instance of amazon linux:

4.4.14-24.50.amzn1.x86_64

If I knew where docker reads the daemon startup config maybe I could edit the bogus container out… Do you know if there’s an editable startup config file somewhere?

Removing all the image files seems a little drastic to me at this point. But I suppose I could rebuild them if necessary.

Per dmaze I removed the entire /var/lib/docker and reinstalled docker. That fixed the issue where the daemon would not start. But now I cannot build or run a container; I get the following error:

$ sudo docker run hello-world

Unable to find image ‘hello-world:latest’ locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: rpc error: code = 2 desc = “oci runtime error: rootfs (”/var/lib/docker/devicemapper/mnt/b9c6f86fa1bcb4d77b35b7e9a25c6d71bd26ed61e2867c233e21363ca4c5b9fe/rootfs") does not exist".

What is rootfs and how am I supposed to obtain it? Shouldn’t it be installed with docker? Or is there another cause and fix for this oci runtime error?

I downgraded docker from 1.11.2 to 1.11.1 and it eliminated the oci runtime error: rootfs.