The “docker version” command should give me the server version of the Docker engine.
Actual behavior
$ docker version
Client:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Wed Apr 27 00:34:20 2016
OS/Arch: darwin/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Information
$ /Applications/Docker.app/Contents/Resources/bin/pinata.bin diagnose -u
OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[ERROR] docker-cli /var/run/docker.sock does not exist
[ERROR] docker-cli Unexpected error (No such file or directory) connecting to /var/run/docker.sock
[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/20160524-101941.tar.gz
Most specific failure is: Unexpected error (No such file or directory) connecting to /var/run/docker.sock
Your unique id is: 6BD99A28-98D3-45F5-BAEC-44914C395AFD
Please quote this in all correspondence.
All was well until I updated to El Capitan 10.11.5. As you can see above, the engine is still running (I do have a container running on localhost that I can still reach, too).
No env variables are set:
$ env | grep DOCKER
$
I have Docker Toolbox installed as well, so it looks like the sock file link reverted back to the toolbox’s file?
$ ls -la /var/run/docker.sock
lrwxr-xr-x 1 root daemon 56 May 24 09:56 /var/run/docker.sock → /var/setup/Library/Containers/com.docker.docker/Data/s60
Steps to reproduce the behavior
Install Docker for Mac on 10.11.4 alongside Docker Toolbox
Test commands against engine to ensure it’s not using a docker-machine engine, run a container.
Upgrade to 10.11.5.
Docker version fails to connect to Docker for Mac’s engine.
Just upgraded to OSX 10.11.5 too, and it is not possible to use the Docker beta. So now I am trying to boot a VM with docker-machine and I get this:
Check network to re-create if needed... Error setting up host only network on machine start: VirtualBox is configured with multiple host-only adapters with the same IP "172.17.8.1". Please remove one.
Does anyone have suggestions? I am really blocked here.
$ pinata diagnose
OS X: version 10.11.5 (build: 15F24b)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[ERROR] docker-cli /var/run/docker.sock does not exist
[ERROR] docker-cli Permission denied (EACCES) connecting to /var/run/docker.sock: check permissions
[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/20160524-232423.tar.gz
Most specific failure is: Permission denied (EACCES) connecting to /var/run/docker.sock: check permissions
Would you like to upload log files? [Y/n]: y
Your unique id is: 723F7090-466E-4D52-9AD1-021A6A6E1AF5
Please quote this in all correspondence.
Same as OP, no Docker environment variables set, same Docker version. Docker.app reports Docker as running. Resetting Docker.app does not help.
$ pinata diagnose
...
Running diagnostic tests:
[ERROR] docker-cli /var/run/docker.sock does not exist
[ERROR] docker-cli Unexpected error (No such file or directory) connecting to /var/run/docker.sock
[OK] Moby booted
...
Digging in I get:
$ ls -l /var/run/docker.sock
lrwxr-xr-x 1 root daemon 56 25 May 09:10 /var/run/docker.sock -> /var/setup/Library/Containers/com.docker.docker/Data/s60
and
$ ls -l /var/setup/Library/Containers/com.docker.docker/Data/s60
ls: /var/setup/Library/Containers/com.docker.docker/Data/s60: No such file or directory
and then…
ls -l /var/setup
ls: /var/setup: No such file or directory
$ find / -type d -name "Containers"
/Users/peterrichards/Library/Containers
And then
$ ls -l /Users/peterrichards/Library/Containers/com.docker.docker/Data/s60
srwxr-xr-x 1 peterrichards staff 0 25 May 09:10 /Users/peterrichards/Library/Containers/com.docker.docker/Data/s60
So it looks like the sym link is just pointing to the wrong place, but I still don’t know what the “correct” fix should be - just change the sym link? Why did this happen, and are other things likely to be affected? Maybe it is worth uninstalling & re-installing Docker for Mac…
I resolved this by uninstalling and re-installing Docker for Mac.
However, I had only just migrated from Docker Terminal so all of my machines got migrated over again - I suspect any new config I’d had in Docker for Mac would have been lost.
After clean install I now get:
$ ls -l /var/run/docker.sock
lrwxr-xr-x 1 root daemon 66 25 May 10:48 /var/run/docker.sock -> /Users/peterrichards/Library/Containers/com.docker.docker/Data/s60
So it looks like a less severe fix would have been to run:
Problem Description
I’m also running into this problem. OSX informed me that my system was going to reboot due to automatically installing an update and after rebooting when I run any “docker” command I now get:
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Bummer that I ran into this, as this beta had fixed my issue of using a Cisco software VPN and being able to use the docker commands. I was actually able to get work done on my laptop without having to SSH into a remote CoreOS system.
System Info
$ pinata diagnose -u
OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[ERROR] docker-cli /var/run/docker.sock does not exist
[ERROR] docker-cli Unexpected error (No such file or directory) connecting to /var/run/docker.sock
[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/20160525-043326.tar.gz
Most specific failure is: Unexpected error (No such file or directory) connecting to /var/run/docker.sock
I also ran into a similar issue after upgrading to OS X 10.11.5. After upgrading my symlinks for docker, docker-machine, and docker-compose from /usr/local/bin no longer pointed to /Applications/Docker.app/Contents/Resources/bin files. After re-creating those three symlinks using ln -sf, I was able to use my docker containers just fine. Your mileage of course may vary.
This did not work for me, but sudo ln -sf $HOME/Library/Containers/com.docker.docker/Data/s60 /var/run/docker.sock (a bit dirtier) did. Restarting Docker.app breaks the symlink again.