- Cannot connect to the Docker daemon at unix:///var/run/docker.sock #1535
- Comments
- skepticsa commented Apr 11, 2017
- Expected behavior
- Actual behavior
- Information
- Steps to reproduce the behavior
- dsheets commented Apr 12, 2017
- samcat116 commented Apr 14, 2017
- cterrazas2 commented Apr 16, 2017 •
- romanr commented Apr 16, 2017
- namitmr commented Apr 17, 2017 •
- djs55 commented Apr 20, 2017
- djs55 commented Apr 20, 2017
- djs55 commented Apr 20, 2017
- djs55 commented Apr 20, 2017
- djs55 commented Apr 20, 2017
- djs55 commented Apr 20, 2017
- djs55 commented Apr 20, 2017
- skytraveler commented Jul 19, 2017
- akellehe commented Aug 3, 2017
- djs55 commented Aug 3, 2017
- droidomz commented Oct 3, 2017
- seyyaw commented Oct 8, 2017
- zhihongzeng2002 commented Nov 21, 2017
- docker-desktop-robot commented Jun 23, 2020
- docker ps on mac is returning Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host? #79
- Comments
- phuongnd08 commented Oct 17, 2014
- phuongnd08 commented Oct 17, 2014
- SvenDowideit commented Oct 19, 2014
- dewshick commented Oct 20, 2014
- spockz commented Jan 14, 2015
- hyperfocus1338 commented Oct 21, 2015
Cannot connect to the Docker daemon at unix:///var/run/docker.sock #1535
Comments
skepticsa commented Apr 11, 2017
Expected behavior
docker version works
Actual behavior
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: darwin/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Information
- Full output of the diagnostics from «Diagnose & Feedback» in the menu
- A reproducible case if this is a bug, Dockerfiles FTW
- Page URL if this is a docs issue or the name of a man page
Steps to reproduce the behavior
Docker for Mac: version: 17.03.1-ce-mac5 (b18e2a50c)
macOS: version 10.12.4 (build: 16E195)
logs: /tmp/A54954A3-12EB-40F2-9C8E-0E8BE5182D57/20170411-154519.tar.gz
failure: com.docker.slirp is not running
[OK] vmnetd
[OK] dns
[ERROR] driver.amd64-linux
com.docker.driver.amd64-linux -db is not running
[OK] virtualization VT-X
[OK] app
[ERROR] moby
/Users/dprisacaru/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/console-ring does not exist
[OK] system
[OK] moby-syslog
[ERROR] db
Connection refused (ECONNREFUSED) connecting to /Users/dprisacaru/Library/Containers/com.docker.docker/Data/s40: check if service is running
com.docker.db is not running
[OK] env
[OK] virtualization kern.hv_support
[ERROR] slirp
Unexpected error ((Failure
«Error connecting socket to 9p endpoint unix:/Users/dprisacaru/Library/Containers/com.docker.docker/Data/s51: Unix.Unix_error(Unix.ECONNREFUSED, «connect», «»)»)) connecting to /Users/dprisacaru/Library/Containers/com.docker.docker/Data/s51
com.docker.slirp is not running
slirp check failed with: (Failure
«Error connecting socket to 9p endpoint unix:/Users/dprisacaru/Library/Containers/com.docker.docker/Data/s52: Unix.Unix_error(Unix.ECONNREFUSED, «connect», «»)»)
[ERROR] osxfs
com.docker.osxfs is not running
[OK] moby-console
[OK] logs
[ERROR] docker-cli
Connection refused (ECONNREFUSED) connecting to /var/run/docker.sock: check if service is running
Connection refused (ECONNREFUSED) connecting to /Users/dprisacaru/Library/Containers/com.docker.docker/Data/s60: check if service is running
docker ps failed
[OK] menubar
[OK] disk
The text was updated successfully, but these errors were encountered:
dsheets commented Apr 12, 2017
Is this the first time you have installed and used Docker for Mac on this machine?
It looks like somehow the virtual block device has become corrupted. Clearly this shouldn’t happen with a new install. I’ve escalated this to our hypervisor team to take a look.
Thanks for your report and interest in Docker for Mac!
samcat116 commented Apr 14, 2017
I am having the same issue it seems. My Diagnosis ID is 2E321B21-600B-47BC-A943-D3A0D96FAEC6
cterrazas2 commented Apr 16, 2017 •
I’m having the same issue:
/Applications/Docker.app/Contents/Resources/bin/docker-diagnose -u
Error exec: plutil -extract appVersionHistory xml1 «/Users/christerrazas//Library/Group Containers/group.com.docker/Library/Preferences/group.com.docker.plist» -o -: exit 1
macOS: version 10.12.3 (build: 16D32)
Docker.app: version: 17.03.1-ce-mac5 (b18e2a50c)
Local time: Sat Apr 15 22:15:45 EDT 2017
UTC: Sun Apr 16 02:15:45 UTC 2017
Timestamp: 20170415-221545
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] disk
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
[OK] kern.hv_support
Docker logs are being collected into /tmp/77982B8E-4149-424C-9C7C-BF0593F7935B/20170415-221545.tar.gz
Your unique id is: 77982B8E-4149-424C-9C7C-BF0593F7935B
Please quote this in all correspondence.
ChristophersMBP:/ christerrazas$ echo $?
0
romanr commented Apr 16, 2017
Having same issue. Brand new Mac with brand new installation from scratch. nothing else installed.
id: A54994D1-FAA0-429F-A82A-DC2B23B70E0C
namitmr commented Apr 17, 2017 •
Had been facing the same issue on installation from scratch, similarly as @romanr but somehow on trial and error conditions, restarting the VirtualBox VM seemed to fix the issue.
djs55 commented Apr 20, 2017
In the logs of A54954A3-12EB-40F2-9C8E-0E8BE5182D57/20170411-154519 there’s some evidence of a previous install:
- log lines like Removing leaked pidfile com.docker.driver.amd64-linux
- a successful VM start and shutdown in the file console-ring.5
- a vmnetd upgrade from version 18 to version 19
I’m a bit suspicious about
- the fact that docker-system.log only seems to cover 36s of activity
- all the Removing leaked pidfile lines: this might mean that the host lost power and all the processes were terminated abruptly. Potentially this could leave things in a bad state.
@skepticsa it looks like the file
/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 has become corrupt — could you delete the file and restart the app? Unfortunately containers and images will need to be rebuilt. Unfortunately the logs aren’t complete enough for me to tell, but the corruption may have happened when running a previous version and this was detected by the stricter integrity checks in the most recent version.
djs55 commented Apr 20, 2017
@samcat116 your logs show a different problem:
Could you compare your system against the list in the System Requirements section of the installation docs:
- Mac must be a 2010 or newer model, with Intel’s hardware support for memory management unit (MMU) virtualization; i.e., Extended Page Tables (EPT) and Unrestricted Mode.
- OS X El Capitan 10.11 and newer macOS releases are supported. At a minimum, Docker for Mac requires macOS Yosemite 10.10.3 or newer, with the caveat that going forward 10.10.x is a use-at-your-own risk proposition.
- Starting with Docker for Mac Stable release 1.13 (upcoming), and concurrent Edge releases, we will no longer address issues specific to OS X Yosemite 10.10. In future releases, Docker for Mac could stop working on OS X Yosemite 10.10 due to the deprecated status of this OS X version. We recommend upgrading to the latest version of macOS.
- At least 4GB of RAM
- VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac). If you have a newer version of VirtualBox installed, it’s fine.
If you believe it should work could you file a separate issue? Thanks!
djs55 commented Apr 20, 2017
@cterrazas2 In the logs of 77982B8E-4149-424C-9C7C-BF0593F7935B/20170415-221545 it looks like the VM is running and the docker daemon started ok:
If you’re still experiencing symptoms, could you open a fresh ticket and describe them in more detail? Thanks!
djs55 commented Apr 20, 2017
Note that during startup, it’s currently expected to see errors like:
(I agree this is a bit ugly, but it is superficial)
djs55 commented Apr 20, 2017
@romanr your logs are similar to @cterrazas2’s: the VM and the docker daemon seem to be working. Apart from initial transient errors, could you describe your symptoms in more detail on a fresh ticket? Thanks!
djs55 commented Apr 20, 2017
@namitmr VirtualBox is used by Docker Toolbox, but not than Docker for Mac. If problems persist, could you report them over at the toolbox repo: https://github.com/docker/toolbox? Thanks!
djs55 commented Apr 20, 2017
I think the summary of this ticket is:
- one definite disk corruption which I think happened on an old version and was picked up after the upgrade. Unfortunately the logs are very short. Unfortunately the best we can do in this state is to work around it by deleting the disk image.
- one hardware requirements issue: should be discussed on a separate issue
- two unclear symptoms but both appear to have working docker engines: ideally we could discuss these on separate issues
- one Docker Toolbox issue: should be discussed on a separate repo
Since these are all quite different I’ll close this ticket to avoid confusion. Feel free to open fresh tickets to discuss any problems you encounter. Thanks for using Docker for Mac!
skytraveler commented Jul 19, 2017
I got the same problem
ocker /Applications/Docker.app/Contents/Resources/bin/docker-diagnose -u
Error exec: plutil -extract appVersionHistory xml1 «/Users/lucas//Library/Group Containers/group.com.docker/Library/Preferences/group.com.docker.plist» -o -: exit 1
macOS: version 10.12 (build: 16A323)
Docker.app: version: 17.06.0-ce-mac19 (4cdec4294a50b2233146b09469b49937dabdebdd)
Local time: 2017年 7月19日 星期三 13时44分26秒 CST
UTC: 2017年 7月19日 星期三 05时44分26秒 UTC
Timestamp: 20170719-134426
Running diagnostic tests:
[ERROR] docker-cli Connection refused (ECONNREFUSED) connecting to /var/run/docker.sock: check if service is running
[ERROR] docker-cli Connection refused (ECONNREFUSED) connecting to /Users/lucas/Library/Containers/com.docker.docker/Data/s60: check if service is running
Error docker ps: timeout after 10.00s
[ERROR] docker-cli docker ps failed: (Failure «docker ps: timeout after 10.00s»)
[OK] Moby booted
[ERROR] driver.amd64-linux com.docker.driver.amd64-linux is not running
[OK] vmnetd
[ERROR] osxfs com.docker.osxfs is not running
[ERROR] db Connection refused (ECONNREFUSED) connecting to /Users/lucas/Library/Containers/com.docker.docker/Data/s40: check if service is running
[ERROR] db com.docker.db is not running
Error docker ps: got timeout (docker ps: exit 1)
[ERROR] vpnkit Unexpected error ((Failure
«Error connecting socket to 9p endpoint unix:/Users/lucas/Library/Containers/com.docker.docker/Data/s51: Unix.Unix_error(Unix.ECONNREFUSED, «connect», «»)»)) connecting to /Users/lucas/Library/Containers/com.docker.docker/Data/s51
[ERROR] vpnkit com.docker.vpnkit is not running
[OK] disk
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
[OK] kern.hv_support
Error exec: echo «00000003.0000f3a6» | nc -U /Users/lucas/Library/Containers/com.docker.docker/Data/connect > /tmp/3B2EE8DD-AA48-4FEB-B2FF-16F253F07411/20170719-134426/diagnostics.tar: exit 1
Most specific failure is: com.docker.vpnkit is not running
Docker logs are being collected into /tmp/3B2EE8DD-AA48-4FEB-B2FF-16F253F07411/20170719-134426.tar.gz
Your unique id is: 3B2EE8DD-AA48-4FEB-B2FF-16F253F07411
Please quote this in all correspondence.
akellehe commented Aug 3, 2017
@djs55 would you mind linking the new issues you opened in this conversation?
djs55 commented Aug 3, 2017
Unfortunately I don’t have references to tickets opened after this was closed. The symptom in common («Cannot connect to Docker daemon») is very general and really just means that something went wrong. I probably should have been clearer in my comment from April that I wanted the original reporters (who are suffering mostly from different underlying problems) to file separate tickets to keep the discussions separate. Unfortunately when different issues are all mixed up together it gets really confusing and makes progress difficult.
FWIW I’m hoping to work on the diagnostics mechanism built into Docker to make it produce better one-line summaries (e.g. «disk couldn’t be mounted», «daemon.json is invalid» etc rather than «cannot connect to docker daemon»). This should help with the initial ticket creation process.
@akellehe Do you have a similar looking issue? If so, could you file a separate issue with a diagnostics id (from the Whale menu -> Diagnose & Feedback . Diagnose & Upload) and say a little about how you encountered it? Thanks!
droidomz commented Oct 3, 2017
I had the same issue please try the following.
brew cask install docker
Then launch the Docker app. Click next. It will ask for privileged access. Confirm. A whale icon should appear in the top bar. Click it and wait for «Docker is running» to appear.
You should be able to run docker commands now.
seyyaw commented Oct 8, 2017
Yes @DroidOm’s solution works for me. It might also ask for an update and restart. After restart give it a while before issuing your commands
zhihongzeng2002 commented Nov 21, 2017
Here are my results, after mac os was updated to high sierra version 10.13.1 (17B48) yesterday
$docker —version
Docker version 17.09.0-ce, build afdb6d4
$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
$ brew cask install docker
==> Satisfying dependencies
==> Downloading https://download.docker.com/mac/stable/19611/Docker.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask docker
==> Installing Cask docker
Error: It seems there is already an App at ‘/Applications/Docker.app’.
$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I also tried some ideas from docker/kitematic#1010
$eval «$(docker-machine env default)»
Host does not exist: «default»
$ docker-machine create default
Running pre-create checks.
Error with pre-create check: «VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path»
docker-desktop-robot commented Jun 23, 2020
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
docker ps on mac is returning Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host? #79
Comments
phuongnd08 commented Oct 17, 2014
I’ve just upgraded to 1.3.0, did a boot2docker upgrade and then:
Look like the tcp port is changed from 2375 to 2376? But the mac version wasn’t updated somehow? Though the 2376 looks like magic, cause changing $DOCKER_HOST to tcp://192.168.59.103:2376 I’ll get:
The text was updated successfully, but these errors were encountered:
phuongnd08 commented Oct 17, 2014
Hmm, that’s weird. Doing boot2docker shellinit prints some variables but it does not apply to current shell. I copy these variables to
/.bashrc and docker is working properly now. Here’s my variables:
SvenDowideit commented Oct 19, 2014
@phuongnd08 you need to run $(boot2docker shellinit) for it to be applied to your current bash
dewshick commented Oct 20, 2014
exporting DOCKER_TLS_VERIFY=1 solved the problem, but boot2docker shellinit does not return anything about DOCKER_TLS_VERIFY
$ boot2docker shellinit
Writing /Users/avyatkin/.docker/boot2docker-vm/ca.pem:
Writing /Users/avyatkin/.docker/boot2docker-vm/cert.pem:
Writing /Users/avyatkin/.docker/boot2docker-vm/key.pem:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/avyatkin/.docker/boot2docker-vm
spockz commented Jan 14, 2015
If you do not perform $(boot2docker shellinit) the pem files are not written at all giving a different error. So be sure the pem files exist and match.
hyperfocus1338 commented Oct 21, 2015
The issue was with my .bash_profile. It should be like this:
Источник