ContainerInspect failed on docker start

Receiving an error on attempting to start docker

docker start 2fa927b5cdd3
Error response from daemon: ContainerInspect failed
Error: failed to start containers: 2fa927b5cdd3

Information

Docker for Mac: version: mac-v1.11.2-beta15
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160613-134600.tar.gz
failure: No error was detected
[OK] docker-cli
[OK] app
[OK] menubar
[OK] virtualization
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

2 Likes

did you ever resolve it? I am experiencing the same.

1 Like

Have the same issue here aswell. Did a clean install of Docker for Mac Stable Channel (1.12.0).

docker start <image_name> fails with

Error response from daemon: ContainerInspect failed Error: failed to start containers: <image_name>

Docker for mac is completely unusable for me.

Diagnosis:

Docker for Mac: version: win-beta-v1.12.0-rc5-beta21-73-g9cd1dc2 OS X: version 10.11.6 (build: 15G31) logs: /tmp/FB53435D-4AC5-4553-82F5-4E679C8BA25E/20160801-091314.tar.gz [OK] docker-cli [OK] app [OK] moby-syslog [OK] disk [OK] virtualization [OK] system [OK] menubar [OK] osxfs [OK] db [OK] slirp [OK] moby-console [OK] logs [OK] vmnetd [OK] env [OK] moby [OK] driver.amd64-linux

Ok, I’ve dug in a bit into this “issue”.

  1. Pulling and image works, so connectivity to registry and at least some calls to internal API work, so far so good.

  2. Tailing logs located at
    /Users/<username>/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log I saw failed attempts at starting containers:

     time="2016-08-04T19:31:35.929305871Z" level=debug msg="Calling GET /containers/redis/json"
     time="2016-08-04T19:31:35.929740717Z" level=error msg="Handler for GET /containers/redis/json returned       error: No such container: redis"
    
  3. Then I checked the docker daemon internal API to see if that was true and indeed:

     $ curl --unix-socket /var/run/docker.sock http:/containers/json
     []
    
  4. Next I wondered if Kitematic would have the same problem, and it ran the redis container just fine. The weird thing is I didn’t see any extra steps involved in creating the container:

     time="2016-08-04T19:37:27.481991459Z" level=debug msg="Calling GET /containers/redis/json"
     time="2016-08-04T19:37:27.486072781Z" level=debug msg="Calling POST /containers/redis/start"
     time="2016-08-04T19:37:27.490440669Z" level=debug msg="container mounted via layerStore: /var/lib/docker/aufs/mnt/c4fda65035cae249b40456a614af9cf973c3f3f5a99df1edffcb8548890aafd4"
     time="2016-08-04T19:37:27.492309496Z" level=debug msg="Assigning addresses for endpoint redis's interface on network bridge"
     time="2016-08-04T19:37:27.495479527Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])"
     time="2016-08-04T19:37:27.507636494Z" level=debug msg="Assigning addresses for endpoint redis's interface on network bridge"
    

It created the container, so calling GET /containers/redis/json worked this time.
5. I finally tried using docker run command and viola, it worked!

How do you currently start such container? You have to use

docker run redis

Which internally calls the following API endpoints:

/containers/create
/containers/(id)/start

TLDR:

Starting a container without previously pulling && creating one results in a scary error:

Error response from daemon: ContainerInspect failed
Error: failed to start containers: <container_name>

However, this should work as docker run <container_name>

or

$ docker pull <container_name>
$ docker create <container_name
$ docker start <hash_from_docker_create>

or use Kitematic for now.

I swear you could just do docker start redis previously…