docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 291 forks source link

initializing Docker API Proxy: open \\.\pipe\docker_engine: Access is denied. #13663

Open wrightjjw opened 1 year ago

wrightjjw commented 1 year ago

Description

On the latest version of docker, I can't even get docker desktop to start. This started happening quite suddenly, and after a fresh reinstall nothing changes.

When trying to start, all I get is a popup that says "Something went wrong. Starting services: initializing Docker API Proxy: open \.\pipe\docker_engine: Access is denied." I have the options "quit", "diagnose & feedback", and "reset Docker to factory settings." None of these fix the problem.

Reproduce

  1. Uninstall docker desktop.
  2. Install the latest version of docker desktop.
  3. Try to start docker desktop.

Expected behavior

Docker desktop should start.

docker version

Client:
 Cloud integration: v1.0.35-desktop+001
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:36:24 2023
 OS/Arch:           windows/amd64
 Context:           default

docker info

Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Diagnostics ID

EF1CFA4B-7118-4ED3-9652-1870C115ACD5/20230829134543

Additional Info

No response

erwanJarno commented 1 year ago

constated on version :

Not impacted :

dmpe commented 1 year ago

Can also confirm this: 24.0.2 works while 24.0.6 does not

EDIT: Ignore please

nickbertovich commented 1 year ago

Still seeing the problem on 4.23.0.

RobRybber commented 1 year ago

This has affected quite a few of my environments, I've had to completely uninstall docker, remove leftover files, and rollback to a previous version. I've tried installing versions 4.22.1, 4.21.1, and like clockwork I get the 'access is denied' to the docker_engine pipe. Nothing will fix it, I've tried switching between linux/windows containers, manually adding permissions to the docker_engine pipe. I have had some success with version 4.22.0. If I just do a vanilla install using the Docker Desktop installer on a clean server, it does not work and I see the error. Pipes are missing, and the file permissions on the data folder are all messed up. However, if I do the following, it seems to work for some inexplicable reason:

  1. Install an Ubuntu distribution in WSL and set it as the default distribution (you can do this with 'wsl --install ubuntu')
  2. Install Docker via admin powershell: & '.Docker Desktop Installer.exe' install -backend=wsl-2 --windows-containers-default-data-root=D:\Data\Docker --wsl-default-data-root=D:\Data\WSL --always-run-service It still messes up the folder permissions, and I have to manually correct them before starting the Docker engine windows service (in my case the D:\Data\Docker folders I'm using instead of the default 'c:\ProgramData\Docker' has no users configured. I have to add docker-users, system, administrators, service accounts) This is the only way I can get it work, and I've repeated it 4 times successfully now on different servers. If I leave out the command line parameters and try and configure my data location in Docker Desktop, it fails. I'm not sure how a new version (4.23.0) got signed off for release when you cant even install Docker Desktop in Windows?
SteemerSon commented 1 year ago

Uninstall. Run installer as Administrator After it complains WSL is not updated. wsl --update Started fine after

daniel-oliveira1401 commented 1 year ago

What worked for me:

Docker Desktop V4.24.1

wrightjjw commented 1 year ago

Thanks for trying to help. I haven't had this issue on later versions of docker, it works fine now. However I have had updates in the past break it like this twice now in the past six months or so. I wish I could provide version numbers but I'll keep an eye out if it happens again.

afattahi54 commented 1 year ago

i have same issue on 4.24.2

afattahi54 commented 1 year ago

upgraded to 4.25.0 and it is resolved

JaieParker commented 1 year ago

I had this error occur. I can consistantly reproduce by:

  1. Install docker on windows account 1
  2. run docker
  3. stop docker engine
  4. switch accounts to windows account 2
  5. try to start docker
  6. 2023-11-08_08-57-29-Docker-Error

Anyway the easy fix for me is to go and shut docker down completely on the other account and the it will run fine on either account.

FYI Im running on latest version as I re-installed yesterday. Docker Engine v24.0.6, windows V4.25.0

I hope this helps someone.

Also @docker-robott that error message appears to have a typo as it says "Initializating" , I think this should be either "Initialization" or "Initializing"

Cheers

leogregianin commented 1 year ago

Upgraded to 4.25.0 and still with problem. Diagnostics for ID: B3EA5DB6-1D24-4BE5-BA03-8EBD6C149778/20231107231356

Apurv7777 commented 11 months ago

What worked for me:

  • Open task manager
  • End the "dockerd.exe" task
  • Open Docker Desktop

Docker Desktop V4.24.1

"THIS WORKS FOR ME, THANKS"

jinyoung-kim-dinnercoding commented 11 months ago

Uninstall. Run installer as Administrator After it complains WSL is not updated. wsl --update Started fine after

Thanks. It works for me.

teee9 commented 11 months ago

happening to me on all recent versions... for now i just downgraded to 4.20.1 and that fixed it... i hope they will fix this soon

abhimalviya commented 10 months ago

I am also facing this issue, tried all the steps.

Ran Diagnostic Tool:
Diagnostics ID: 32A2AA20-005B-4766-959E-BF87EF73DB76/2024010409

guigovaski commented 10 months ago

What worked for me:

  • Open task manager
  • End the "dockerd.exe" task
  • Open Docker Desktop

Docker Desktop V4.24.1

Nice man! This works for me.

VikasPiprade-catapult commented 9 months ago

Problem solved

Error response from daemon: open \.\pipe\docker_engine_linux: Access is denied

The error I got when I tried to run my tests on Linux docker container on Windows 11 using Github Actions's self hosted runner.

When I changed 'Github Action Runner' Services log on permission from 'This Account' to 'Local Account' problem is resolved. Problem was Github Actions was unable to access docker services from local Github runner.

image

doringeman commented 9 months ago

Hello, could you provide a new set of diagnostics, please? Using 4.26.1 or 4.27 would be helpful. :)

wrightjjw commented 9 months ago

I do not experience this issue on 4.27

VikasPiprade-catapult commented 9 months ago

Docker version 24.0.7, build afdd53b. Docker Desktop version 4.26.1 (131620)

archaeron commented 9 months ago

Have this with Docker Desktop 4.27.1.

There are very seldom times when it works. But most of the time I get this error. The fixes suggested in this thread did not help

MattiLehtinen commented 9 months ago

I had this error when running Podman desktop at the same time. Stopping podman machine and disabling auto-start of it helped.

doringeman commented 9 months ago

Hello, Are you using Docker Desktop signed in multiple users? Right after you encounter the issue, can you provide us diagnostics? See here.

SeriousM commented 9 months ago

I had this error when running Podman desktop at the same time. Stopping podman machine and disabling auto-start of it helped.

That worked for me well. The process that consumed the socket was winssh-proxy.exe from podman. image

Zimzozaur commented 8 months ago

I have the same error on Docker 4.27.2.

robynrox commented 8 months ago

None of the above fixes has worked for me on 4.27.2.

doringeman commented 8 months ago

Hello, Reiterating this:

Are you using Docker Desktop signed in multiple users? Right after you encounter the issue, can you provide us diagnostics? See here.

nopeless commented 8 months ago

using choco if you install both docker desktop and docker engine by accident like me u may run into this issue

uninstall both and only install one

Quelich commented 7 months ago

In my case, I was using a Github runner as a service to deploy Docker containers on my Windows server. I experienced similar problems and I tried downgrading the Docker engine but it did not work.

Then I stopped the Github service and reran the runner with the ./run.cmd command in PowerShell as an administrator. This solved my problem.

teee9 commented 7 months ago

issue was resolved for me by stopping Podman processes on windows!

issam-seghir commented 7 months ago

So, I ran into the exact same problem when installing both docker engine and docker-desktop with scoop ,what is worked for me is :

  1. Uninstall both Docker Engine and Docker Desktop from your system.
  2. Reboot your system.
  3. Install Docker Desktop: Instead of installing Docker Engine separately, Docker Desktop bundles everything you need, including Docker Engine.
  4. Reboot your system again.
  5. Finally, you can run Docker Desktop without any issues.
williammadie commented 7 months ago

I had this error occur. I can consistantly reproduce by:

1. Install docker on windows account 1

2. run docker

3. stop docker engine

4. switch accounts to windows account 2

5. try to start docker

6. ![2023-11-08_08-57-29-Docker-Error](https://private-user-images.githubusercontent.com/6509093/281193678-c52ca4c4-5441-4fbd-a23a-4a915820e168.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI1ODI2OTAsIm5iZiI6MTcxMjU4MjM5MCwicGF0aCI6Ii82NTA5MDkzLzI4MTE5MzY3OC1jNTJjYTRjNC01NDQxLTRmYmQtYTIzYS00YTkxNTgyMGUxNjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MDhUMTMxOTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWYzYzQ1ZjA4MTgwMGQ5M2M2M2FkY2VjZThjMWUwMGU3NzMxMzA1NTJiYThlYzdkNmRhOTEzMmZmYWQwNDM4NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.sKhBj6nSsr7LgqOSFUts7ZMj8QegtQi9zvnPHwjPl5g)

Anyway the easy fix for me is to go and shut docker down completely on the other account and the it will run fine on either account.

FYI Im running on latest version as I re-installed yesterday. Docker Engine v24.0.6, windows V4.25.0

I hope this helps someone.

Also @docker-robott that error message appears to have a typo as it says "Initializating" , I think this should be either "Initialization" or "Initializing"

Cheers

Thank you. This did the trick

syedalinaqi commented 3 days ago

Experienced the Same issue. Resolved it by turning off (killing) wsl related processes.