Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.35/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. #1825

Closed
Venkateshkuntla opened this issue Mar 13, 2018 · 99 comments

Comments

@Venkateshkuntla
Copy link

Expected behavior

Actual behavior

Information

  • Diagnostic ID 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
  • host distribution and version (Windows version, build number, etc)

Steps to reproduce the behavior

  1. ...
  2. ...
@heidricha
Copy link

same for me. service looks like running, but no client can connect. user- or elevated level of command line.

G508031@RMM-P7000032FW MINGW64 /
$ net start com.docker.service
The Docker for Windows Service service is starting.
The Docker for Windows Service service was started successfully.

G508031@RMM-P7000032FW MINGW64 /
$ docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:05:22 2017
OS/Arch: windows/amd64
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.35/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

G508031@RMM-P7000032FW MINGW64 /
$ net start com.docker.service
The requested service has already been started.

@shaneasullivan
Copy link

I had the same issue - I was able to resolve the issue by running power shell with Admin privs. I validated this was the same behavior for running the commands via elevated cmd prompt. It also enabled docker run hello-world command which was returning the error message ...Access is denied. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

@heidricha
Copy link

Solved for me. Run docker desktop app, check in notification. Setup if necessary...
Be happy.

@rn
Copy link
Contributor

rn commented Apr 30, 2018

Closing this issue. @Venkateshkuntla, if you still have the problem, please re-open and supply a diagnostics ID and detaisl of your setup (Docker for Windows version etc).

@rn rn closed this as completed Apr 30, 2018
@girishgodage
Copy link

I had the same issue - I was able to resolve the issue by running power shell with Admin privs.

@rorygilfillan
Copy link

I have the same issue since I upgraded. Powershell in admin mode doesn't help.

PS C:\WINDOWS\system32> docker version
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:05:28 2018
OS/Arch: windows/amd64
Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

@mlenser
Copy link

mlenser commented Aug 28, 2018

Same issue as @rorygilfillan. Docker is on my PATH, but I get:
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

@changshihkai0121
Copy link

same problem at my windows....

$ docker images
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

$ docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:21:34 2018
OS/Arch: windows/amd64
Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

@fluggo
Copy link

fluggo commented Sep 1, 2018

Same issue. Diagnostics ID 67ED6A1F-C0B5-466D-9BC3-DF0228895023/20180901135537

@Relaxe111
Copy link

same issue:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:21:34 2018
OS/Arch: windows/amd64
Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

@AlexEJerome
Copy link

Same issue: 601A73D6-300C-4099-96C4-1D1FE8D18493/20180917131950

@ducquoc
Copy link

ducquoc commented Sep 25, 2018

I fixed this issue by settings the certificate environment variables (for SSH/TLS):

SET DOCKER_CERT_PATH=%UserProfile%\.docker\machine\machines\HypervDefault
SET DOCKER_MACHINE_NAME=HypervDefault
SET DOCKER_HOST=tcp://192.168.1.15:2376
SET DOCKER_TLS_VERIFY=1

The problem began when I created the "HypervDefault" machine, and deleted the "default" machine, which can be verified with docker-machine commands:

docker-machine ls
docker-machine env HypervDefault
FOR /f "tokens=*" %i IN ('docker-machine env HypervDefault') DO @%i

The above commands might need to run with Admin privileges (elevated), and make sure docker service is running: net start com.docker.service . Then the docker commands can run well:

docker ps
docker image ls
docker container ls --all

P.S: If your local IP Address (NAT) changes, for example: 192.168.1.3 --> 192.168.1.15 ; you can re-generate the certs (and it will auto update config.json for the machine respectively)
docker-machine regenerate-certs [machine-name]

-Duc

@blueyestar
Copy link

@ducquoc does not work at step FOR /f "tokens=*" %i IN ('docker-machine env HypervDefault') DO @%i

Windows 10 Home/ AMD64

@ducquoc
Copy link

ducquoc commented Oct 22, 2018

@blueyestar :
That line, I use the "HypervDefault" as the machine name. In default case , the name is "default" . I think you should check that. (and adjust the variable environment to default respectively)

Another possibility is that some batch syntax (of cmd.exe) might not be run by PowerShell. In new versions of Docker they will use PowerShell syntax , so I think you can check the actual to be used by using the default (no machine name):

docker-machine env 

That will have output as a hint about the loop command to set environment variables. (though usually it's only the IP change need to be updated)

@zilurrane
Copy link

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

@prabuddha-kulatunga
Copy link

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

Thanks!

@ManikantaCV
Copy link

@prabuddha93: Issue solved with your solution. Thank you

@mikfaina
Copy link

Me too

@alkreddy
Copy link

alkreddy commented Nov 26, 2018

@zilurrane ...your tip resolved the issue... See my note for my observation

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

Especially on windows machine when you see the above error after a docker update, try the above commands. It appears like the Docker Desktop UI may indicate that you are already using Linux Containers, but the update may have messed up that setting. Running the above commands will set to Linux Containers and there after you can work happily.

@bhanotra
Copy link

bhanotra commented Dec 4, 2018

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

worked for me as well

@eduuh
Copy link

eduuh commented Dec 6, 2018

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

this worked for me..Thank you very much

@naywin-programmer
Copy link

open with powershell, It work for me.

@ngie-eign
Copy link

ngie-eign commented Dec 10, 2018

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

Thanks!

This isn't a workable solution to be honest for Linux containers users (assuming Docker is configured to use Linux containers), since it papers over an issue with Linux Containers by switching Docker over to use Windows containers.

There's a problem with the interoperability of Docker, HyperV, Linux containers, and security levels (in my case) that are preventing me from making progress installing even the most basic docker containers (alpine, centos).

I'm going to look around a bit more for instructions, and if all else fails, screw it and install a Linux desktop on my corporate laptop in order to get my job done. I've been very disappointed with how much of a headache it's been trying to get this to work on Windows, compared to OSX where everything "just worked out of the box".

@ngie-eign
Copy link

For anyone else reading this thread, the error message is coming from HyperV.

@taishjason
Copy link

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

Thanks for this. It solve my issue.

@ngie-eign
Copy link

ngie-eign commented Dec 19, 2018

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

Thanks for this. It solve my issue.

As noted previously, this switches Docker from Linux to Windows containers. This doesn't likely fix the underlying issue; it only papers over the fact that there's an issue with HyperV interacting with Docker.

I'll see if I can get Docker to work with my Windows 10 Pro desktop, given that I no longer have access to the machine that I ran into the original issues with.

@StudioDove
Copy link

I had the same issue very recently and was able to get it working again pretty easily:

`Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:51 2018
OS/Arch: windows/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: false
`

I fixed it by using "Reset to factory defaults..." under Settings > Reset.

Of course I had to sign in again and all my containers were gone, so I had to re-download everything but that's not a big deal, after all that is what docker is for, right!

@doomtoo
Copy link

doomtoo commented Jan 9, 2019

Seems docker toolbox gets messed up when you reinstall it/ uninstall/ reinstall it.

I had to first delete the path variables, then run C:\Program Files\Docker Toolbox\start.sh, and was able to run 'docker info' without the error.

@hejunion
Copy link

I fixed this issue by settings the certificate environment variables (for SSH/TLS):

SET DOCKER_CERT_PATH=%UserProfile%\.docker\machine\machines\HypervDefault
SET DOCKER_MACHINE_NAME=HypervDefault
SET DOCKER_HOST=tcp://192.168.1.15:2376
SET DOCKER_TLS_VERIFY=1

The problem began when I created the "HypervDefault" machine, and deleted the "default" machine, which can be verified with docker-machine commands:

docker-machine ls
docker-machine env HypervDefault
FOR /f "tokens=*" %i IN ('docker-machine env HypervDefault') DO @%i

The above commands might need to run with Admin privileges (elevated), and make sure docker service is running: net start com.docker.service . Then the docker commands can run well:

docker ps
docker image ls
docker container ls --all

P.S: If your local IP Address (NAT) changes, for example: 192.168.1.3 --> 192.168.1.15 ; you can re-generate the certs (and it will auto update config.json for the machine respectively)
docker-machine regenerate-certs [machine-name]

-Duc

Right for me.

@imoisharma
Copy link

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

I am trying to run but not able to resolve the issue and secondly, after installing I've only docker toolbox inside program files because of windows 10 basic. Kindly help me to resolve the issue

@qinyanjuidavid
Copy link

I used Anaconda it worked but on cmd it failed.

@letmerecall
Copy link

In my case docker service was not running.

Steps to start:
Check Docker Desktop Service in Services (run > services.msc).
Sart that if not running.

docker

@XimikRU
Copy link

XimikRU commented Apr 21, 2020

I fixed this issue by settings the certificate environment variables (for SSH/TLS):

SET DOCKER_CERT_PATH=%UserProfile%\.docker\machine\machines\HypervDefault
SET DOCKER_MACHINE_NAME=HypervDefault
SET DOCKER_HOST=tcp://192.168.1.15:2376
SET DOCKER_TLS_VERIFY=1

Helped.

SET DOCKER_CERT_PATH=C:\Users\%YOUR_USER%\.docker\machine\machines\default
SET DOCKER_MACHINE_NAME=default
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_TLS_VERIFY=1

@darshankumarys
Copy link

This fixed the issue in Windows machine.

MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

@sinistram
Copy link

sinistram commented May 13, 2020

I had the same problem in Win Server 2019. I just opened Services and started Docker Engine service.
It is strangely, but the service does not starting after installation in his own.

After that it worked for admin user.
In order to add access for other user you can use this commands in powershell:

Install-Module -Name dockeraccesshelper
Import-Module dockeraccesshelper
Add-AccountToDockerAccess "domain\user"

@akoua
Copy link

akoua commented May 14, 2020

@ducquoc does not work at step FOR /f "tokens=*" %i IN ('docker-machine env HypervDefault') DO @%i

Windows 10 Home/ AMD64

You must already change EditionID from Core to Professional on register there Ordinateur\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

@eaniket
Copy link

eaniket commented May 15, 2020

  1. Run 'dockerd.exe' located in 'C:\Program Files\Docker\Docker\resources' .
  2. Now execute 'docker version' on a new powershell as administrator

@hoanganh130893
Copy link

hoanganh130893 commented May 27, 2020

Hey it fixed ,
Try to run this command :
docker-machine env
You will see this:
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\LAP13670-local.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"

Run this command to configure your shell:

eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)

then run this command on your shell
eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)

=> Your problem was solved
image

@vivekarya-code
Copy link

I ran Docker Desktop and restarted my system and it worked.

@WuYouyan
Copy link

WuYouyan commented Jun 7, 2020

I had same problem Windows 7. Tried some of the above, nothing worked. I fixed mine by going into Docker Toolbox folder, and double clicking start.sh
your installation directory\Docker Toolbox
Find start.sh
Double click start.sh
Wait for it to finish, then it'll work.
docker is configured to use the default machine with IP 192.168.99.101
For help getting started, check out the docs at https://docs.docker.com
Start interactive shell

Win 10 familly/ intel i5
This helps me too! tks

@tarohida
Copy link

I'm encountered same error in powershell on Windows10 Pro, Version 1909. I run docker on HyperV.

Docker Desktop Service was runnning. Restarting Docker Desktop Service finished successfully but same error appeared.
I restart OS, but same error appeared.

I ran docker desktop app, and did tutorial.
Tutorial has finished successfully, And after that, I successfully run docker command.

PS > docker --version
Docker version 19.03.8, build afacb8b

Installed Docker Desktop for Windows's channel is "stable" one.

@AnujSR02
Copy link

Expected behavior

Actual behavior

Information

  • Diagnostic ID 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
  • host distribution and version (Windows version, build number, etc)

Steps to reproduce the behavior

  1. Installing the latest version of Virtual Box resolved this issue.

@eschrader
Copy link

I uninstalled the Hyper-V service and network adapters a while ago. I think that broke my docker install

@aritrey
Copy link

aritrey commented Jun 27, 2020

I had the same error message and for me it was my antivirus program that interfered with running docker. I had to switch of the real time scan. (I use avira).

@carlosb-awlatam
Copy link

carlosb-awlatam commented Jul 3, 2020

Run 'dockerd.exe' located in 'C:\Program Files\Docker' work for me

or try

top-service docker
Get-ContainerNetwork | Remove-ContainerNetwork -Force
Start-service docker

@danielsouzasp
Copy link

I had the same problem but I'm using "minkube", then I just ran: "minikube docker-env" to see and se the correct env on windows prompt.

@bin-y
Copy link

bin-y commented Jul 10, 2020

If anyone getting error like "error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/ ... archive/tar: write too long"
the problem seems caused by symlinks in the folder.
I solved the problem by removing symlinks from the folder
reference: kubernetes/kompose#656

@alvaromon
Copy link

alvaromon commented Jul 15, 2020

This is an issue for me i downloaded the latest docker and Terraform. I cant use the Docker provider because the docker_host value isnt working ive look everywhere tried all solutions:

  • turn on experimental cli mode
  • using localhost as docker host
  • using named pipe as docker host
  • restarting docker service
  • using dockertools for docker-machine to see VM host value

after using docker machine and creating a VM i noticed the VM was using IPv6? what does this mean

docker env output:

SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://[fe80::215:5dff:fe10:900]:2376
SET DOCKER_CERT_PATH=C:\Users\myuser\.docker\machine\machines\mydockervm
SET DOCKER_MACHINE_NAME=mydockervm
SET COMPOSE_CONVERT_WINDOWS_PATHS=true
REM Run this command to configure your shell:
REM     @FOR /f "tokens=*" %i IN ('docker-machine env mydockervm') DO @%i

useful info:

  • i am on a brand new Windows Server 2019
  • to create VM using docker-machine i had to create a external switch in HyperV Manager
  • used docker-machine.exe create --driver hyperv --hyperv-virtual-switch "myexternalswitch" --hyperv-cpu-count "1" --hyperv-memory "1024" --hyperv-disk-size "20000" mydockervm to create VM

@earagol
Copy link

earagol commented Jul 18, 2020

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

Muchas gracias...

@funkkyexalter
Copy link

funkkyexalter commented Jul 30, 2020

There was no such folder in my Windows 10:

"C:\Program Files\Docker\Docker"

I got it running by the following command in windows PowerShell:
& "C:\ProgramData\chocolatey\lib\docker-machine\bin\docker-machine.exe" env dev | Invoke-Expression

And then I was able to get the following output:

PS C:\WINDOWS\system32> docker version
Client:
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.12
 Git commit:        0ed913b8-
 Built:             07/28/2020 16:36:03
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:35 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Futher can see all images as: PS C:\WINDOWS\system32> docker images

And also was able to run the image hello-world as: PS C:\WINDOWS\system32> docker run hello-world

Cool, thanks for the help and guide...

@ImanCol
Copy link

ImanCol commented Aug 10, 2020

For anyone else reading this thread, the error message is coming from HyperV.

Running pre-create checks...
Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue..

image

@stidiovip
Copy link

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

In Powershell elevated access solved my issue.

This is the solution. Juste wait sill docker service notifies before trying your docker command again ;)

@docker-robott
Copy link
Collaborator

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

@docker docker locked and limited conversation to collaborators Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests