docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 117 forks source link

Cannot connect to the Docker daemon. Is the docker daemon running on this host? #984

Closed globalcitizen closed 7 years ago

globalcitizen commented 7 years ago

Expected behavior

docker ps lists containers, and docker pull gentoo/stage3-amd64-hardened:latest pulls a container.

Actual behavior

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Information

Other

Diagnostic ID: 3BE80BB2-B4F8-44EA-90D7-00FEA7048FDD

Docker for Mac: version: 1.12.3 (583d1b8)
OS X: version 10.12.1 (build: 16B2555)
logs: /tmp/3BE80BB2-B4F8-44EA-90D7-00FEA7048FDD/20161125-033556.tar.gz
[OK]     vmnetd
[OK]     dns
[OK]     driver.amd64-linux
[OK]     virtualization VT-X
[OK]     app
[OK]     moby
[OK]     system
[OK]     moby-syslog
[OK]     db
[OK]     env
[OK]     virtualization kern.hv_support
[OK]     slirp
[OK]     osxfs
[OK]     moby-console
[OK]     logs
[OK]     docker-cli
[OK]     menubar
[OK]     disk

Output of ps aux |grep -i docker...

user            12622   0.0  0.1  2550408  16520   ??  Ss    3:14am   0:00.10 com.docker.slirp --db /Users/user/Library/Containers/com.docker.docker/Data/s40 --ethernet fd:3 --port fd:4 --introspection fd:5 --vsock-path /Users/user/Library/Containers/com.docker.docker/Data/@connect
user            12621   0.0  0.1  2496620  13344   ??  Ss    3:14am   0:00.09 com.docker.osxfs --address fd:3 --connect /Users/user/Library/Containers/com.docker.docker/Data/@connect --control fd:4 --volume-control fd:5 --database /Users/user/Library/Containers/com.docker.docker/Data/s40
user             6052   0.0  0.0 556642028   1668   ??  S    Mon03am   0:00.22 /Applications/Docker.app/Contents/MacOS/com.docker.osx.hyperkit.linux
user             6050   0.0  0.0 556664208   3936   ??  Ss   Mon03am   0:01.54 com.docker.osx.hyperkit.linux
user             6047   0.0  0.2  2556888  25624   ??  Ss   Mon03am   1:12.85 com.docker.db --url fd:3 --git /Users/user/Library/Containers/com.docker.docker/Data/database
user             6046   0.0  0.0 556641004   1668   ??  S    Mon03am   0:00.26 /Applications/Docker.app/Contents/MacOS/com.docker.osx.hyperkit.linux -watchdog fd:0
user             6045   0.0  0.0 556717008   3492   ??  S    Mon03am   0:00.27 /Applications/Docker.app/Contents/MacOS/com.docker.osx.hyperkit.linux -watchdog fd:0
root             6040   0.0  0.0  2443392    220   ??  Ss   Mon03am   0:00.01 /Library/PrivilegedHelperTools/com.docker.vmnetd
user             6026   0.0  0.6  2758508 103048   ??  S    Mon03am   4:17.49 /Applications/Docker.app/Contents/MacOS/Docker
user             1501   0.0  0.0 573413220      8   ??  S    Fri10pm   0:00.01 /usr/local/bin/docker-machine
user            13295   0.0  0.0  2433828   2132 s000  S+    3:38am   0:00.00 grep -i docker
user            12627   0.0  0.6  4769144 102844   ??  S     3:14am   0:11.97 /Applications/Docker.app/Contents/MacOS/com.docker.hyperkit -A -m 2G -c 4 -u -s 0:0,hostbridge -s 31,lpc -s 2:0,virtio-vpnkit,uuid=c1ab9ca4-d7d8-43cc-a86a-6cd51ea3ca33,path=/Users/user/Library/Containers/com.docker.docker/Data/s50,macfile=/Users/user/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/mac.0 -s 3,virtio-blk,file:///Users/user/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2?sync=1&buffered=1,format=qcow -s 4,virtio-9p,path=/Users/user/Library/Containers/com.docker.docker/Data/s40,tag=db -s 5,virtio-rnd -s 6,virtio-9p,path=/Users/user/Library/Containers/com.docker.docker/Data/s51,tag=port -s 7,virtio-sock,guest_cid=3,path=/Users/user/Library/Containers/com.docker.docker/Data,guest_forwards=2376;1525 -l com1,autopty=/Users/user/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty,log=/Users/user/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/console-ring -f kexec,/Applications/Docker.app/Contents/Resources/moby/vmlinuz64,/Applications/Docker.app/Contents/Resources/moby/initrd.img,earlyprintk=serial console=ttyS0 com.docker.driver="com.docker.driver.amd64-linux", com.docker.database="com.docker.driver.amd64-linux" ntp=gateway mobyplatform=mac -F /Users/user/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/hypervisor.pid
user            12624   0.0  0.1 556641040  11748   ??  S     3:14am   0:00.02 /Applications/Docker.app/Contents/MacOS/com.docker.driver.amd64-linux -db /Users/user/Library/Containers/com.docker.docker/Data/s40 -osxfs-volume /Users/user/Library/Containers/com.docker.docker/Data/s30 -slirp /Users/user/Library/Containers/com.docker.docker/Data/s50 -vmnet /var/tmp/com.docker.vmnetd.socket -port /Users/user/Library/Containers/com.docker.docker/Data/s51 -vsock /Users/user/Library/Containers/com.docker.docker/Data -docker /Users/user/Library/Containers/com.docker.docker/Data/s60 -addr fd:3 -debug
user            12623   0.0  0.1 556718420  18076   ??  Ss    3:14am   0:00.13 com.docker.driver.amd64-linux -db /Users/user/Library/Containers/com.docker.docker/Data/s40 -osxfs-volume /Users/user/Library/Containers/com.docker.docker/Data/s30 -slirp /Users/user/Library/Containers/com.docker.docker/Data/s50 -vmnet /var/tmp/com.docker.vmnetd.socket -port /Users/user/Library/Containers/com.docker.docker/Data/s51 -vsock /Users/user/Library/Containers/com.docker.docker/Data -docker /Users/user/Library/Containers/com.docker.docker/Data/s60 -addr fd:3 -debug
ebriney commented 7 years ago

I suspect that you have docker_machine env left in your .bash_profile, can you run /Applications/Docker.app/Contents/Resources/bin/docker-diagnose in your terminal? Remove any DOCKER_* env and tell him if it fixed the problem.

globalcitizen commented 7 years ago

Cheers.

I found an ancient cruft-ridden declare -x DOCKER_HOST="tcp://192.168.59.103:2375" in ~/.profile.

In the event that failures are thrown, it would really help to improve ease of debugging (and therefore reduce the number of issues submitted) if a message like Cannot connect to the Docker daemon. Is the docker daemon running on this host? was better written.

Example: Cannot connect to the Docker daemon. Is the docker daemon running on 192.168.69.103:2375? (value from DOCKER_HOST environment variable)

docker-robott commented 4 years ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked