Docker ps error to connect

Expected behavior

List containers

Actual behavior

$ docker ps -a
An error occurred trying to connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.23/containers/json?all=1: EOF

Information

OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
Error docker ps: timeout after 1.70s
Thread 6 killed on uncaught exception Misc.Failure
Error docker ps: timeout after 10.00s
[ERROR] docker-cli docker ps failed: Misc.Failure
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160421-221121.tar.gz
Most specific failure is: docker ps failed: Misc.Failure
Your unique id is: C7B9731F-E790-4851-89A9-B9181EAAABBB

Steps to reproduce the behavior

  1. docker ps -a
  2. I get this : An error occurred trying to connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.23/containers/json?all=1: EOF

Event after rebooting the VM with : pinata restart or restarting my Mac.

I got this too:

Issue type

  • missing documentation step for existing Docker Toolbox users

OS Version/build

KENMBP:~ kennethlimcp$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.11.4
BuildVersion:	15E39d

App version

KENMBP:~ kennethlimcp$ docker version
Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   a5315b8
 Built:        Mon Apr 18 19:19:21 2016
 OS/Arch:      linux/amd64

Steps to reproduce the behavior

  • run docker ps after installing Docker for Mac with existing settings in .bash_profile

Solution:

Remove the existing settings in .bash_profile

export DOCKER_TLS_VERIFY="xxx"
export DOCKER_HOST="xxxx"
export DOCKER_CERT_PATH="xxxxx"
export DOCKER_MACHINE_NAME="default"

Restart the terminal and docker ps should work now.

I have no DOCKER_* environment variables.
env | grep -i DOCKER
is empty.

Same here; there’s no DOCKER_ environment variables. I find the http://var/run/docker.sock to be not right? manual says it should be unix:// if it’s a unix socket.

It looks like for me Docker is not responding; opened up the Console and that’s what it says. Did you just upgrade to Beta 8? I did and it broke.

4/25/16 7:11:02.167 PM Docker[21857]: com.docker.vmnetd reports MAC address: c6:21:08:4b:cf:32
4/25/16 7:11:02.167 PM Docker[21857]: rx batching enabled (len=64)
4/25/16 7:11:02.168 PM com.docker.slirp[21850]: PPP.negotiate: received ((magic VMN3T)(version 12)(commit 3c1bfeb0e86a9403f82302edfea4c4987cc2cb32))
4/25/16 7:11:02.168 PM com.docker.slirp[21850]: PPP.negotiate: received (Ethernet 338b4af9-7867-4a15-9f6d-30a5f1e3209b)
4/25/16 7:11:02.168 PM com.docker.slirp[21850]: PPP.negotiate: sending ((mtu 1500)(max_packet_size 1550)(client_macaddr c0:ff:ee:c0:ff:ee))
4/25/16 7:11:02.169 PM com.docker.slirp[21850]: PPP.listen: called a second time: doing nothing
4/25/16 7:11:02.169 PM com.docker.slirp[21850]: TCP/IP ready
4/25/16 7:11:04.739 PM Docker[21852]: Docker is not responding: waiting 0.5s
4/25/16 7:11:05.244 PM Docker[21852]: Docker is not responding: waiting 0.5s
4/25/16 7:11:05.745 PM Docker[21852]: Docker is not responding: waiting 0.5s
4/25/16 7:11:06.252 PM Docker[21852]: Docker is not responding: waiting 0.5s
4/25/16 7:11:06.757 PM Docker[21852]: Docker is not responding: waiting 0.5s
4/25/16 7:11:07.261 PM Docker[21852]: Docker is not responding: waiting 0.5s
4/25/16 7:11:07.531 PM com.docker.osxfs[21849]: transfused: mount 
4/25/16 7:11:07.531 PM com.docker.osxfs[21849]: transfused: /bin/fusermount 
4/25/16 7:11:07.531 PM com.docker.osxfs[21849]: transfused: -o 
4/25/16 7:11:07.532 PM com.docker.osxfs[21849]: transfused: allow_other,max_read=1048576,subtype=osxfs 
4/25/16 7:11:07.532 PM com.docker.osxfs[21849]: transfused: /Mac 
4/25/16 7:11:07.532 PM com.docker.osxfs[21849]: transfused: 
4/25/16 7:11:07.532 PM com.docker.osxfs[21849]: osxfs tracing: OFF 
4/25/16 7:11:09.162 PM Docker[21852]: Docker is responding

Rebooting did fix this.