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

Docker Desktop cannot start - An unexpected error occurred #13273

Open
3 tasks done
VasilisGlykos opened this issue Mar 2, 2023 · 56 comments
Open
3 tasks done

Docker Desktop cannot start - An unexpected error occurred #13273

VasilisGlykos opened this issue Mar 2, 2023 · 56 comments

Comments

@VasilisGlykos
Copy link

VasilisGlykos commented Mar 2, 2023

An unexpected error was encountered while executing a WSL command. Common causes include access rights issues, which occur after waking the computer or not being connected to your domain/active directory.

Please try shutting WSL down (wsl --shutdown) and/or rebooting your computer. If not sufficient, WSL may need to be reinstalled fully. As a last resort, try to uninstall/reinstall Docker Desktop. If the issue persists please collect diagnostics and submit an issue (https://docs.docker.com/desktop/troubleshoot/overview/#diagnose-from-the-terminal).

Error details:
2 errors occurred:
* provisioning docker WSL distros: deploying "docker-desktop": importing WSL distro "The system cannot find the path specified.\r\r\n" output="docker-desktop": running WSL command "wsl.exe --import docker-desktop C:\Users\glykos\AppData\Local\Docker\wsl\distro C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2" failed with output "The system cannot find the path specified.\r\r\n": exit status 0xffffffff
* checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: C227A38E-371A-4352-96F4-3A3B6EA02833/20230302171029

Actual behavior

Expected behavior

Information

  • Windows Version: Windows 10 Pro 64bit 22H2
  • Docker Desktop Version: 4.17.0 (99724)
  • WSL2 or Hyper-V backend? WSL2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

Steps to reproduce the behavior

  1. ...
  2. ...
@tehautanop
Copy link

tehautanop commented Mar 3, 2023

Experiencing almost the same, Docker Desktop 4.17.0 was just installed fresh to Win10, but with error:

2 errors occurred:
    * starting keep alive in the data distro: waiting for wsl-keepalive to be ready: running wsl-keepalive in "docker-desktop->data": exit status 0xffffffff
 >   * checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The filename, directory name, or volume label syntax is incorrect.

Uninstall, reboot and reinstall didn't fix this.

@cladoulis
Copy link

I am experiencing the same issue, which started this week. Docker Desktop will not start.
Windows Version: Windows 10 Pro 64bit 21H2
Docker Desktop Version: 4.17.0
WSL2 or Hyper-V backend? WSL2

Errors include "provisioning docker WSL distros: deploying "docker-desktop": importing WSL distro "The parameter is incorrect.\r\r\n" and "* checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found."

I have attempted removal of Hyper-V, WSL2, and all Hypervisor from windows, and re-install as Administrator. No luck yet. I managed to get Docker Desktop running temporarily, after installing without WSL2 (so Docker created the setup). But after restart, while connected to different network, the error recurs.

@dgageot dgageot self-assigned this Mar 3, 2023
@dgageot
Copy link
Member

dgageot commented Mar 3, 2023

Hello, could you please paste the output of wsl.exe -l -v here?

@cladoulis
Copy link

Hi David, This is result:

PS C:\Windows\system32> wsl.exe -l -v
Windows Subsystem for Linux has no installed distributions.

Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install ' to install.

Distributions can also be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND
PS C:\Windows\system32>

@cladoulis
Copy link

I have so far only been able to restart Docker Desktop when I do the following:

Access “Turn Windows Features On/Off” and set

  • Virtual Machine Platform OFF
  • Windows Hypervisor Platform ON
  • Windows Subsystem for Linux ON
  • Hyper-V OFF

My WSL Status now shows:
PS C:\Windows\system32> wsl --status
Default Distribution: docker-desktop-data
Default Version: 2

I will keep exploring to find what causes or affects this, but I have restarted once, and Docker Desktop loaded successfully again. I'll post more info if it breaks again...

@ghost
Copy link

ghost commented Mar 3, 2023

I’ve had the problem on windows and the crux of this problem is why when selecting WSL doesn’t windows also include the virtual machine as a pre-requisite? It should. Because both are required! Unfortunately, the windows install allows you to install WSL without the virtual machine option.

@airh00k
Copy link

airh00k commented Mar 3, 2023

To fix the "provisioning docker WSL distros: setting main distro version" error, try disabling the legacy console. You can do this by following these steps:

a. Open the "Command Prompt" app as an administrator.
b. Right-click on the app's title bar and select "Properties."
c. Click on the "Options" tab.
d. Uncheck the "Use legacy console" option.
e. Click "OK" to save your changes.

After disabling the legacy console, try opening the Docker Desktop client again and see if the error is resolved.

To fix the "checking if isocache exists" error, try the following:

a. Open the "Command Prompt" app as an administrator.
b. Run the following command: net use wsl$ \localhost\docker-desktop-data
c. If prompted for credentials, enter your Windows username and password.
d. Try opening the Docker Desktop client again and see if the error is resolved.

If these steps do not resolve the issue, you may need to reinstall Docker Desktop.

@llhgood
Copy link

llhgood commented Mar 6, 2023

Hello, I also encountered the same problem, how did I solve it in the end?

@cladoulis
Copy link

Ok, my new settings seem stable, and Docker Desktop continues to run in Windows 10 21H2:

Windows Subsystem for Linux ON (updated to WSL2)
Virtual Machine Platform ON

Hyper-V OFF
Windows Hypervisor Platform OFF

I don't know what will happen if I turn Hyper-V on again

@aliza614
Copy link

aliza614 commented Mar 6, 2023

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\me> & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
[2023-03-06T16:42:04.165144300Z][com.docker.diagnose.exe][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[SKIP] DD0028: is there available VM disk space?
[PASS] DD0002: does the bootloader have virtualization enabled?
[SKIP] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0035: is the VM time synchronized?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[FAIL] DD0011: are the LinuxKit services running? failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.
[2023-03-06T16:42:07.547896200Z][com.docker.diagnose.exe][I] ipc.NewClient: 004acc94-diagnose -> \.\pipe\dockerDiagnosticd diagnosticsd
[2023-03-06T16:42:07.548396500Z][com.docker.diagnose.exe][I] (848a78c2) 004acc94-diagnose C->S diagnosticsd GET /ping
[2023-03-06T16:42:07.549368700Z][com.docker.diagnose.exe][W] (848a78c2) 004acc94-diagnose C<-S NoResponse GET /ping (501.6µs): Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

[FAIL] DD0004: is the Docker engine running? Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:07.551872900Z][com.docker.diagnose.exe][I] ipc.NewClient: 9861874c-com.docker.diagnose -> \.\pipe\dockerLifecycleServer VMDockerdAPI
[2023-03-06T16:42:07.552369400Z][com.docker.diagnose.exe][I] (4eff4192) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /docker
[2023-03-06T16:42:07.552868100Z][com.docker.diagnose.exe][W] (4eff4192) 9861874c-com.docker.diagnose C<-S NoResponse GET /docker (501.7µs): Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:07.553363700Z][com.docker.diagnose.exe][I] (4eff4192-1) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:07.553363700Z][com.docker.diagnose.exe][W] (4eff4192-1) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:08.560745900Z][com.docker.diagnose.exe][I] (4eff4192-2) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:08.561435300Z][com.docker.diagnose.exe][W] (4eff4192-2) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (693.5µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:09.565262300Z][com.docker.diagnose.exe][I] (4eff4192-3) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:09.565770300Z][com.docker.diagnose.exe][W] (4eff4192-3) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (511µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:10.568239800Z][com.docker.diagnose.exe][I] (4eff4192-4) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:10.569012400Z][com.docker.diagnose.exe][W] (4eff4192-4) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (777.2µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:11.575273100Z][com.docker.diagnose.exe][I] (4eff4192-5) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:11.575480700Z][com.docker.diagnose.exe][W] (4eff4192-5) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (208.9µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:12.590312300Z][com.docker.diagnose.exe][I] (4eff4192-6) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:12.590370200Z][com.docker.diagnose.exe][W] (4eff4192-6) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (58.2µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:13.600526800Z][com.docker.diagnose.exe][I] (4eff4192-7) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:13.601043600Z][com.docker.diagnose.exe][W] (4eff4192-7) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (522.5µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T16:42:14.606769300Z][com.docker.diagnose.exe][I] (4eff4192-8) 9861874c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T16:42:14.607417000Z][com.docker.diagnose.exe][W] (4eff4192-8) 9861874c-com.docker.diagnose C<-S NoResponse GET /ping (651.6µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.

[PASS] DD0015: are the binary symlinks installed?
[FAIL] DD0031: does the Docker API work? error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/containers/json?limit=0": open //./pipe/docker_engine_linux: The system cannot find the file specified.
[PASS] DD0013: is the $PATH ok?
error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json": open //./pipe/docker_engine: The system cannot find the file specified.
[FAIL] DD0003: is the Docker CLI working? exit status 1
[PASS] DD0005: is the user in the docker-users group?
[PASS] DD0038: is the connection to Docker working?
[FAIL] DD0014: are the backend processes running? 2 errors occurred:
* com.docker.vpnkit.exe is not running
* com.docker.proxy.exe is not running

[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? open \.\pipe\dockerVpnKitDiagnostics: The system cannot find the file specified.
[FAIL] DD0010: is the Docker API proxy responding? failed to ping Docker proxy API with error: Get "http://ipc/desktop-diagnostics/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:20.684696800Z][com.docker.diagnose.exe][I] ipc.NewClient: d185d446-diagnose -> \.\pipe\dockerDesktopLinuxEngine Proxy
[2023-03-06T16:42:20.684696800Z][com.docker.diagnose.exe][I] (6223584d) d185d446-diagnose C->S Proxy GET /desktop-diagnostics/ping
[2023-03-06T16:42:20.685207500Z][com.docker.diagnose.exe][W] (6223584d) d185d446-diagnose C<-S NoResponse GET /desktop-diagnostics/ping (0s): Get "http://ipc/desktop-diagnostics/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:20.685207500Z][com.docker.diagnose.exe][I] (6223584d-1) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:20.685207500Z][com.docker.diagnose.exe][W] (6223584d-1) d185d446-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:21.680421200Z][com.docker.diagnose.exe][I] (6223584d-2) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:21.680983400Z][com.docker.diagnose.exe][W] (6223584d-2) d185d446-diagnose C<-S NoResponse GET /ping (565.5µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:22.681637800Z][com.docker.diagnose.exe][I] (6223584d-3) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:22.682189100Z][com.docker.diagnose.exe][W] (6223584d-3) d185d446-diagnose C<-S NoResponse GET /ping (763.1µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:23.687333900Z][com.docker.diagnose.exe][I] (6223584d-4) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:23.688164600Z][com.docker.diagnose.exe][W] (6223584d-4) d185d446-diagnose C<-S NoResponse GET /ping (835.6µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:24.698791800Z][com.docker.diagnose.exe][I] (6223584d-5) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:24.699468400Z][com.docker.diagnose.exe][W] (6223584d-5) d185d446-diagnose C<-S NoResponse GET /ping (680.6µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:25.699794800Z][com.docker.diagnose.exe][I] (6223584d-6) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:25.700527900Z][com.docker.diagnose.exe][W] (6223584d-6) d185d446-diagnose C<-S NoResponse GET /ping (737.5µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:26.706386500Z][com.docker.diagnose.exe][I] (6223584d-7) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:26.706386500Z][com.docker.diagnose.exe][W] (6223584d-7) d185d446-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T16:42:27.717699000Z][com.docker.diagnose.exe][I] (6223584d-8) d185d446-diagnose C->S Proxy GET /ping
[2023-03-06T16:42:27.718237000Z][com.docker.diagnose.exe][W] (6223584d-8) d185d446-diagnose C<-S NoResponse GET /ping (541.3µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.

[PASS] DD0006: is the Docker Desktop Service responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0002: does the bootloader have virtualization enabled?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0035: is the VM time synchronized?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[WARN] DD0011: are the LinuxKit services running? failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.
[WARN] DD0004: is the Docker engine running? Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[PASS] DD0015: are the binary symlinks installed?
[WARN] DD0031: does the Docker API work? error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/containers/json?limit=0": open //./pipe/docker_engine_linux: The system cannot find the file specified.
[WARN] DD0032: do Docker networks overlap with host IPs? error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/networks": open //./pipe/docker_engine_linux: The system cannot find the file specified.

Please note the following 4 warnings:

1 : The check: are the LinuxKit services running?
Produced the following warning: failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

The Docker engine runs inside a Linux VM as a service. Therefore the services must have started.

2 : The check: is the Docker engine running?
Produced the following warning: Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.

The Docker engine manages all containers and images on the host. Check the dockerd.log to see why it failed to start.

3 : The check: does the Docker API work?
Produced the following warning: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/containers/json?limit=0": open //./pipe/docker_engine_linux: The system cannot find the file specified.

If the Docker API is not available from the host then Docker Desktop will not work correctly.

4 : The check: do Docker networks overlap with host IPs?
Produced the following warning: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/networks": open //./pipe/docker_engine_linux: The system cannot find the file specified.

If the subnet used by a Docker network overlaps with an IP used by the host, then containers
won't be able to contact the overlapping IP addresses.

Try configuring the IP address range used by networks: in your docker-compose.yml.
See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address

Please investigate the following 2 issues:

1 : The test: are the LinuxKit services running?
Failed with: failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

The Docker engine runs inside a Linux VM as a service. Therefore the services must have started.

2 : The test: are the backend processes running?
Failed with: 2 errors occurred:
* com.docker.vpnkit.exe is not running
* com.docker.proxy.exe is not running

Not all of the backend processes are running.

Steps to reproduce the error::

  1. add & remove programs --> remove docker
  2. control panel--> check that docker is removed
  3. reboot
  4. appdata/roaming and appdata/local delete it
  5. add & remove programs ubuntu, windows subsystem for linux x3 remove all
  6. reboot
  7. setting-> search for windows features -->turn off hyperv, virtual machine platform, windows subsystem for linux
  8. reboot now turn above 3 back on
  9. reboot
  10. install docker desktop v 4.17.0
  11. reboot
  12. open docker but install wsl from website in error message https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package steps 4 & 5
  13. reboot
  14. open docker
  15. get this error message

By the way I checked and am not using the legacy console

@aliza614
Copy link

aliza614 commented Mar 6, 2023

I also disabled hyper v and windows hypervisor platform and rebooted and it still won't start. Getting this error

System.Exception:
2 errors occurred:
* starting keep alive in the data distro: waiting for wsl-keepalive to be ready: running wsl-keepalive in "docker-desktop-data": exit status 0xffffffff
* checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.

at Docker.Engines.WSL2.LinuxWSL2Engine.d__11.MoveNext() in C:\workspaces\4.17.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 108
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\4.17.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.d__7.MoveNext() in C:\workspaces\4.17.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.d__7.MoveNext() in C:\workspaces\4.17.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 108
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.EngineStateMachine.d__15.MoveNext() in C:\workspaces\4.17.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 72
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.Engines.d__23.MoveNext() in C:\workspaces\4.17.x\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 109

here's the result of the dianose.exe file now that hyperv and windows hypervisor are turned off

& "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
[2023-03-06T17:53:08.295420800Z][com.docker.diagnose.exe][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[SKIP] DD0028: is there available VM disk space?
[PASS] DD0002: does the bootloader have virtualization enabled?
[SKIP] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0035: is the VM time synchronized?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[FAIL] DD0011: are the LinuxKit services running? failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.
[2023-03-06T17:53:10.446237700Z][com.docker.diagnose.exe][I] ipc.NewClient: 7d2f80d9-diagnose -> \.\pipe\dockerDiagnosticd diagnosticsd
[2023-03-06T17:53:10.446804300Z][com.docker.diagnose.exe][I] (16a58504) 7d2f80d9-diagnose C->S diagnosticsd GET /ping
[2023-03-06T17:53:10.447309400Z][com.docker.diagnose.exe][W] (16a58504) 7d2f80d9-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

[FAIL] DD0004: is the Docker engine running? Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:10.447860000Z][com.docker.diagnose.exe][I] ipc.NewClient: 571f006c-com.docker.diagnose -> \.\pipe\dockerLifecycleServer VMDockerdAPI
[2023-03-06T17:53:10.448411700Z][com.docker.diagnose.exe][I] (5f5e980d) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /docker
[2023-03-06T17:53:10.448411700Z][com.docker.diagnose.exe][W] (5f5e980d) 571f006c-com.docker.diagnose C<-S NoResponse GET /docker (0s): Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:10.448926800Z][com.docker.diagnose.exe][I] (5f5e980d-1) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:10.448926800Z][com.docker.diagnose.exe][W] (5f5e980d-1) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:11.451099100Z][com.docker.diagnose.exe][I] (5f5e980d-2) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:11.451869300Z][com.docker.diagnose.exe][W] (5f5e980d-2) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (770.2µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:12.455878600Z][com.docker.diagnose.exe][I] (5f5e980d-3) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:12.458397800Z][com.docker.diagnose.exe][W] (5f5e980d-3) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (2.5192ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:13.463178600Z][com.docker.diagnose.exe][I] (5f5e980d-4) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:13.463678000Z][com.docker.diagnose.exe][W] (5f5e980d-4) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:14.471550700Z][com.docker.diagnose.exe][I] (5f5e980d-5) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:14.472276900Z][com.docker.diagnose.exe][W] (5f5e980d-5) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (726.2µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:15.473732900Z][com.docker.diagnose.exe][I] (5f5e980d-6) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:15.474417100Z][com.docker.diagnose.exe][W] (5f5e980d-6) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (684.2µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:16.475548700Z][com.docker.diagnose.exe][I] (5f5e980d-7) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:16.476308000Z][com.docker.diagnose.exe][W] (5f5e980d-7) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (759.3µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-03-06T17:53:17.492164500Z][com.docker.diagnose.exe][I] (5f5e980d-8) 571f006c-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-03-06T17:53:17.493281200Z][com.docker.diagnose.exe][W] (5f5e980d-8) 571f006c-com.docker.diagnose C<-S NoResponse GET /ping (1.1167ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.

[PASS] DD0015: are the binary symlinks installed?
[FAIL] DD0031: does the Docker API work? error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/containers/json?limit=0": open //./pipe/docker_engine_linux: The system cannot find the file specified.
[PASS] DD0013: is the $PATH ok?
error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json": open //./pipe/docker_engine: The system cannot find the file specified.
[FAIL] DD0003: is the Docker CLI working? exit status 1
[PASS] DD0005: is the user in the docker-users group?
[PASS] DD0038: is the connection to Docker working?
[FAIL] DD0014: are the backend processes running? 2 errors occurred:
* com.docker.proxy.exe is not running
* com.docker.vpnkit.exe is not running

[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? open \.\pipe\dockerVpnKitDiagnostics: The system cannot find the file specified.
[FAIL] DD0010: is the Docker API proxy responding? failed to ping Docker proxy API with error: Get "http://ipc/desktop-diagnostics/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:27.747193700Z][com.docker.diagnose.exe][I] ipc.NewClient: 98680009-diagnose -> \.\pipe\dockerDesktopLinuxEngine Proxy
[2023-03-06T17:53:27.747193700Z][com.docker.diagnose.exe][I] (bca76f59) 98680009-diagnose C->S Proxy GET /desktop-diagnostics/ping
[2023-03-06T17:53:27.747695100Z][com.docker.diagnose.exe][W] (bca76f59) 98680009-diagnose C<-S NoResponse GET /desktop-diagnostics/ping (501.4µs): Get "http://ipc/desktop-diagnostics/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:27.747695100Z][com.docker.diagnose.exe][I] (bca76f59-1) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:27.747695100Z][com.docker.diagnose.exe][W] (bca76f59-1) 98680009-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:28.749575900Z][com.docker.diagnose.exe][I] (bca76f59-2) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:28.750247400Z][com.docker.diagnose.exe][W] (bca76f59-2) 98680009-diagnose C<-S NoResponse GET /ping (777.6µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:29.765049400Z][com.docker.diagnose.exe][I] (bca76f59-3) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:29.765823300Z][com.docker.diagnose.exe][W] (bca76f59-3) 98680009-diagnose C<-S NoResponse GET /ping (773.9µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:30.768642100Z][com.docker.diagnose.exe][I] (bca76f59-4) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:30.770031400Z][com.docker.diagnose.exe][W] (bca76f59-4) 98680009-diagnose C<-S NoResponse GET /ping (1.3893ms): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:31.784147700Z][com.docker.diagnose.exe][I] (bca76f59-5) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:31.785195900Z][com.docker.diagnose.exe][W] (bca76f59-5) 98680009-diagnose C<-S NoResponse GET /ping (1.0482ms): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:32.800146700Z][com.docker.diagnose.exe][I] (bca76f59-6) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:32.800146700Z][com.docker.diagnose.exe][W] (bca76f59-6) 98680009-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:33.804680700Z][com.docker.diagnose.exe][I] (bca76f59-7) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:33.805668900Z][com.docker.diagnose.exe][W] (bca76f59-7) 98680009-diagnose C<-S NoResponse GET /ping (1.214ms): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.
[2023-03-06T17:53:34.816793600Z][com.docker.diagnose.exe][I] (bca76f59-8) 98680009-diagnose C->S Proxy GET /ping
[2023-03-06T17:53:34.817875200Z][com.docker.diagnose.exe][W] (bca76f59-8) 98680009-diagnose C<-S NoResponse GET /ping (1.0816ms): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified.

[PASS] DD0006: is the Docker Desktop Service responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0002: does the bootloader have virtualization enabled?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0035: is the VM time synchronized?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[WARN] DD0011: are the LinuxKit services running? failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.
[WARN] DD0004: is the Docker engine running? Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[PASS] DD0015: are the binary symlinks installed?
[WARN] DD0031: does the Docker API work? error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/containers/json?limit=0": open //./pipe/docker_engine_linux: The system cannot find the file specified.
[WARN] DD0032: do Docker networks overlap with host IPs? error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/networks": open //./pipe/docker_engine_linux: The system cannot find the file specified.

Please note the following 4 warnings:

1 : The check: are the LinuxKit services running?
Produced the following warning: failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

The Docker engine runs inside a Linux VM as a service. Therefore the services must have started.

2 : The check: is the Docker engine running?
Produced the following warning: Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified.

The Docker engine manages all containers and images on the host. Check the dockerd.log to see why it failed to start.

3 : The check: does the Docker API work?
Produced the following warning: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/containers/json?limit=0": open //./pipe/docker_engine_linux: The system cannot find the file specified.

If the Docker API is not available from the host then Docker Desktop will not work correctly.

4 : The check: do Docker networks overlap with host IPs?
Produced the following warning: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine_linux/v1.24/networks": open //./pipe/docker_engine_linux: The system cannot find the file specified.

If the subnet used by a Docker network overlaps with an IP used by the host, then containers
won't be able to contact the overlapping IP addresses.

Try configuring the IP address range used by networks: in your docker-compose.yml.
See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address

Please investigate the following 2 issues:

1 : The test: are the LinuxKit services running?
Failed with: failed to ping VM diagnosticsd with error: Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

The Docker engine runs inside a Linux VM as a service. Therefore the services must have started.

2 : The test: are the backend processes running?
Failed with: 2 errors occurred:
* com.docker.proxy.exe is not running
* com.docker.vpnkit.exe is not running

Not all of the backend processes are running.

@llhgood
Copy link

llhgood commented Mar 8, 2023

I solved this error, but the method is more crude, I upgraded my computer in situ, that is, download the upgrade tool WIN10 from the official website to WIN10, my data and software are retained, only the system is reset, and the docker error is also solved

@Didza
Copy link

Didza commented Mar 21, 2023

Most of these issues mostly occur when experimental features are turned on. Be sure to untick in settings to have the most stable run. Another part to check is WSL especially if you migrated from Win 10 to Win 11.

@Sbhalsing0
Copy link

There issue with one of the WSL installed on your machine. So please check if is there any wrong with WSL.
Use below command to check WSL installed on your machine.

wsl -l #list wsl installed
wsl --update
wsl --unregister wsl-name
wsl --shutdown

@corwestermaniddink
Copy link

corwestermaniddink commented Mar 27, 2023

Same issue, de-installed Docker Desktop and tried to install old version (4.17.0), but installation failed:

Component CommunityInstaller.EnableFeaturesAction failed: Not found 
   at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()

@L-evi
Copy link

L-evi commented Mar 29, 2023

有一个解决方法就是:重置Windows的网络设置,我尝试了之后确实可以打开docker desktop了,此前改动网络设置是因为我使用了VMware虚拟机

One solution is to reset the network settings for Windows. After trying, I can actually open Docker Desktop. Previously, I changed the network settings because I used a VMware virtual machine

@liohi
Copy link

liohi commented Apr 5, 2023

I use the following two steps to be effective

  • I opened CMD with the authority authority, type this command
    netsh winsock reset
    to reset my network

  • Uninstall and reinstall docker desktop

hope which can help you

@Giant-Jelly
Copy link

Giant-Jelly commented Apr 7, 2023

For those looking for a fix for this. Make sure your Virtual Machine Platform, Windows Hypervisor Platform and Windows Subsystem for Linux are all on. And that you have a distro installed. You can check if you have a distro installed with wsl --list --all. If you dont have one, install one (I use ubuntu) from the microsoft store app.

image

Then delete the .wslconfig file at C:\Users\<your username> and manually run your distro app from the windows menu. This will prompt it to install and setup. Then re-run docker and it should work as intended.

@zeenotheinventor
Copy link

If you're still struggling to get this done and on Windows chances are you've not enabled updating this.

  1. Press windows key then type Windows Update. Select the option
  2. Click advanced Options
  3. Turn on Receive updates for other Microsoft products when you update Windows
  4. Check for windows updates, you should have some updates to install
  5. Open Powershell then run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  6. Restart your pc (make sure installation at step 4 is also complete)

It should be working now. The reason it fails seems to be because windows doesn't enable updating optional feature by default.

@vivek-meka
Copy link

I am not sure if this solves the issue for everyone. Somehow I tried this and it worked.

I ran this command in windows cli

wsl.exe -l -v

It showed Ubuntu-18.04 as my default Linux distribution. I just changed it to docker-desktop using the following command

wsl --setdefault docker-desktop

After that I have opened the Docker desktop again and it worked.

@carlonio
Copy link

  1. Exit Docker Desktop
  2. Delete de folder "C:/users/.docker"
  3. Open Docker Desktop

@corwestermaniddink
Copy link

@carlonio @vivek-meka @zeenotheinventor You're suggestion are not solving my installation error.

@Giant-Jelly I think your comment is the solution, but at my win10 installation the hyper-v platform is corrupted and re-install is failing. My laptop is going to be re-imaged/re-installed today, not only for this installation error, so I'm good.

@hyphen81
Copy link

Was just having this issue, and after restarting and getting nowhere, I tried running wsl --update. Then I opened docker again and everything works.

@JefteMedeiros
Copy link

Guys, I spent 40 minutes trying to solve this issue... What worked for me: Try the other solutions such as enabling Hyper-V, reinstalling docker, etc... but if nothing works, do as I did:

1 - Unregister all folders with name docker inside WSL (wsl --unregister (name containing docker, like docker-desktop)
2 - Reopen docker desktop

@Rogers423
Copy link

If you're doing it in a VM then you should enable hardware virtualization in the VM (aka nested virtualization).i was installing and running the docker desktop in a windows vm and got this error but enabling hardware virtualization solved this error for me.

@l-robinsonl
Copy link

only thing that worked for me was re installing wsl. it has happened today for a second time i really would love to know how to stop it happening i lose over half a days work setting up new environments when it happens

@dev-rizwanqureshi
Copy link

image

image

image

Still I am not able to run docker on windows 11

@dev-rizwanqureshi
Copy link

netsh winsock reset
This worked for me

@DenisLopatin
Copy link

netsh winsock reset
It worked for me too, but now every time I launch the docker app, I see this error message, but docker is working... What is it? Idk

@John24y
Copy link

John24y commented Jun 3, 2023

Win10 LTSC 2021版本暗转 Docker Desktop 4.20 打开报错 An unexpected error occurred.

试过不行的方法:
● 安装时打开或者关闭WSL2
● 卸载后重启,安装后重启,再打开
● netsh winsock reset, 重启
● LSP修复工具
● 退出proxifier,360 VPN
● 退出Docker,执行以下命令,再打开
wsl --unregister rancher-desktop
wsl --unregister rancher-desktop-data
● 删除 C:/users/.docker,重启
#13273

可行的方法:
更换4.19.0版本, 关闭自动更新,下载地址:
https://docs.docker.com/desktop/release-notes/#400

@logan-hoopla
Copy link

Still broken on windows 11 - When will this bug be fixed?

@matoc94
Copy link

matoc94 commented Jun 13, 2023

@yhling
Copy link

yhling commented Jul 9, 2023

Hit this issue while setting up Docker Desktop on a brand spanking new Windows 11 installation.

Amazing QA this software has.

Falling back to Hyper-V for now.

@LeonardoChermaut
Copy link

This happened to me, even with docker and wsl working.

I tried forcing some WSL functions to see if it wasn't a bug:
1ª I checked if there was "wsl --version" and it returns the version. OK.
2ª I forced the update "wsl --update" and it returns a message of the last update made. OK.
3ª I forced the installation "wsl --install"

4ª Control Panel:
Hyper-V, Windows Subsystem for Linux and Windows Hypervisor Platform have been enabled.

Reboot system and return to working.

reference: https://www.docker.com/blog/docker-hearts-wsl-2/

@lingme
Copy link

lingme commented Jul 14, 2023

I use the following two steps to be effective

  • I opened CMD with the authority authority, type this command
    netsh winsock reset
    to reset my network
  • Uninstall and reinstall docker desktop

hope which can help you

thanks you ,is working.

@kevinyyyy
Copy link

I use the following two steps to be effective

  • I opened CMD with the authority authority, type this command
    netsh winsock reset
    to reset my network
  • Uninstall and reinstall docker desktop

hope which can help you

Thank you bro, it worked for me. But why ???

@WaelHabboubi
Copy link

Hi all,
Just after the clean up and the netsh winshock reset if not worked try those commands and give me feedback :
#Setup WSL2 (Enable Hyper-V)
#Fire up your PowerShell(Administrative mode) and run the below commands.
#This will enable the virtualization feature which will be used by WSL2

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

#Next you have to find out your Installed Linux Distribution, so that you can set that distribution to work as WSL version 2.
wsl -l -v

#convert your current Linux Distribution to WSL version 2
wsl --set-version Ubuntu 2

#Finally, if you want to use your WSL2 as the default version then execute the command below.
wsl --set-default-version 2

@murderface45
Copy link

netsh winsock reset

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

It doesn't work for me

@amitondenis
Copy link

amitondenis commented Aug 17, 2023

if you run VM with Windows 10 and Docker from Hyper-V Server you need to activate Nested Virtualization
https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/enable-nested-virtualization
While the virtual machine is in the OFF state, run the following command on the physical Hyper-V host to enable nested virtualization for the virtual machine.

PowerShell:
Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true

Docker help:
https://docs.docker.com/desktop/vm-vdi/

@SimonHolzknecht
Copy link

SimonHolzknecht commented Oct 5, 2023

Hi, don't know if this thread is still active but I encountered the same issue with "ensure virtualization is enabled".

After many different approaches I tried what was advertised in https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80370102-the-virtual-machine-could-not-be-started-because-a-required-feature-is-not-installed:

  • execute "bcdedit /enum | findstr -i hypervisorlaunchtype" (administator cmd console)
  • if you see "hypervisorlaunchtype Off", type "bcdedit /set hypervisorlaunchtype Auto"
  • restart the computer

Thought I would share as this issue drove me insane as everything seemed to be enabled...

@darkwizard543
Copy link

make sure virtualisation is enabled in the bios, this solved the problem for me

@SimonHolzknecht
Copy link

SimonHolzknecht commented Oct 8, 2023

make sure virtualisation is enabled in the bios, this solved the problem for me

This might help in some cases, that feature was enabled in my case though
Edit: not only in windows features but also in BIOS

@AnthonyZhang220
Copy link

for those who reset their network by running the command netsh winsock reset, this would work, but some people might have to reset every time you restart your PC.

Here are a few things you could check:

  1. make sure you are not running any VPN service in the background.
  2. make sure you have not twisted any of your DNS and IP settings

I followed the second solution, and it worked for me.

@FlickerMi
Copy link

docker desktop version 4.25 error, demoted to 4.21.0 can be opened

@Leonce01
Copy link

Thanks for the suggestions. I did most of the previous troubleshooting suggestions. from turn windows features on and off, to wsl unregister and install. then install a specific linux distribution, after which i had another error message on my command prompt that suggested i turn on virtualization on my BIOS and docker desktop finally worked for me.

@Yunie9
Copy link

Yunie9 commented Nov 15, 2023

docker desktop version 4.25 error, demoted to 4.21.0 can be opened

Thanks for you, the 4.21.0 version works fine on my computer.

@Norlandz
Copy link

in short

for my case:

run Docker with admin right

details

run Docker with admin right

  • (tried other shutdown/upgrade wsl steps - dont think relevant)
  • I ran Docker with admin right, then this error is gone.
    (I suspect this is a permission problem, cuz I have encountered other permission problem with Docker -- eg: need to install Docker with admin right; other process access docker dameon;)
  • Waited starting the docker engine for about 6min
  • (In the meantime, I open Linux shell; tried wsl -l -v / wsl --version -- just to check the status; - dont think relevant)
    PS H:\test> wsl -l -v
      NAME                   STATE           VERSION
    * Ubuntu-22.04           Stopped         1
      docker-desktop-data    Running         2
      docker-desktop         Running         2
    
  • closed Docker Desktop;
    reopened without admin right;
    waited starting the docker engine for about 6min;
    seemed working fine still.
  • When Docker Desktop is running, I checked the setting inside, (dont know what they really mean)::
    Y Use the WSL 2 based engine
    WSL 2 provides better performance than the Hyper-V backend. Learn more
    
    Configure which WSL 2 distros you want to access Docker from.
    Y Enable integration with my default WSL distro
    
    You don't have any WSL 2 distros installed. Please convert a WSL 1 distro to WSL 2, or install a new distro and it will appear here.
    
  • closed Docker Desktop

upgrade wsl to v2

  • I saw my Ubuntu-22.04 is running in v1, idk why
    so I want to upgrade wsl to v2 by wsl --set-version Ubuntu-22.04 2 -- see Cannot Update from WSL 1 to WSL 2 microsoft/WSL#5922 & https://admcpr.com/how-to-upgrade-wsl-1-to-wsl-2/
    waited 15min, succeed

  • then I checked the version & status

    PS H:\test> wsl -l -v
      NAME                   STATE           VERSION
    * Ubuntu-22.04           Stopped         2
      docker-desktop-data    Stopped         2
      docker-desktop         Stopped         2
    
  • then I tried to open Docker Desktop again, without admin right,
    waited starting the docker engine for about 15min; timeout error

  • then I ran it with admin right again, succeed

  • then I checked the version & status

    PS H:\test> wsl -l -v
      NAME                   STATE           VERSION
    * Ubuntu-22.04           Running         2
      docker-desktop-data    Running         2
      docker-desktop         Running         2
    
  • then I checked config inside Docker

    Y Use the WSL 2 based engine
    WSL 2 provides better performance than the Hyper-V backend. Learn more
    
    Configure which WSL 2 distros you want to access Docker from.
    Y Enable integration with my default WSL distro
    
    Enable integration with additional distros:
    N Ubuntu-22.04
    
  • closed Docker Desktop;
    reopened without admin right;
    waited starting the docker engine for about 6min;
    seemed working fine still.

  • did docker build, able to see image appeared inside

environment

  • Docker v4.25.1
  • Windows 10
  • WSL Ubuntu v22.04 in Windows 10
  • fresh install

@BenVlodgi
Copy link

I had to enable CPU Virtualization in my BIOS

@zzy3ly
Copy link

zzy3ly commented Dec 14, 2023

Oh,who can help me......i try all method i have known,no one save me?Please,who can help me

@SimonHolzknecht
Copy link

SimonHolzknecht commented Dec 14, 2023

Oh,who can help me......i try all method i have known,no one save me?Please,who can help me

Did you try this?

"""
After many different approaches I tried what was advertised in https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80370102-the-virtual-machine-could-not-be-started-because-a-required-feature-is-not-installed:

execute "bcdedit /enum | findstr -i hypervisorlaunchtype" (administator cmd console)
if you see "hypervisorlaunchtype Off", type "bcdedit /set hypervisorlaunchtype Auto"
restart the computer
Thought I would share as this issue drove me insane as everything seemed to be enabled...
"""

@zzy3ly
Copy link

zzy3ly commented Dec 14, 2023

Oh,who can help me......i try all method i have known,no one save me?Please,who can help me

Did you try this?

""" After many different approaches I tried what was advertised in https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80370102-the-virtual-machine-could-not-be-started-because-a-required-feature-is-not-installed:

execute "bcdedit /enum | findstr -i hypervisorlaunchtype" (administator cmd console) if you see "hypervisorlaunchtype Off", type "bcdedit /set hypervisorlaunchtype Auto" restart the computer Thought I would share as this issue drove me insane as everything seemed to be enabled... """

thanks,my bro.i tried just now,result is hypervisorlaunchtype Auto.So,it may not the key in my problem.

@zzy3ly
Copy link

zzy3ly commented Dec 14, 2023

Hey,everone,i solove my problm by using docker desktop 4.20.0. Maybe the old version is more suitable for most computers.

@kNewBcaveman
Copy link

Oh,who can help me......i try all method i have known,no one save me?Please,who can help me

Did you try this?

""" After many different approaches I tried what was advertised in https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80370102-the-virtual-machine-could-not-be-started-because-a-required-feature-is-not-installed:

execute "bcdedit /enum | findstr -i hypervisorlaunchtype" (administator cmd console) if you see "hypervisorlaunchtype Off", type "bcdedit /set hypervisorlaunchtype Auto" restart the computer Thought I would share as this issue drove me insane as everything seemed to be enabled... """

Thanks!
That resolved my issue.

@normalllll
Copy link

Hey,everone,i solove my problm by using docker desktop 4.20.0. Maybe the old version is more suitable for most computers.

Yes, older versions run fine on Windows LTSC 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests