docker / for-win

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

Unable to start Docker Engine. #13492

Open shreyasoti opened 1 year ago

shreyasoti commented 1 year ago

Actual behavior : Unable to open the docker engine in docker desktop after installing, It keeps on loading forever.

Attaching some of the screenshots for the reference

Expected behavior: Docker Engine should start after installing

Information

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

[PASS] DD0027: is there available disk space on the host? [FAIL] DD0028: is there available VM disk space? running powershell command ('Get-DiskImage -ImagePath 'C:\Users\HP\AppData\Local\Docker\wsl\data\ext4.vhdx' | Select-Object -Property FileSize, Size | ft -hidetableheaders'): : exec: "powershell": executable file not found in %PATH% [SKIP] DD0002: does the bootloader have virtualization enabled? [SKIP] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [SKIP] DD0022: is the Virtual Machine Platform Windows Feature enabled? [SKIP] DD0021: is the WSL 2 Windows Feature enabled? [FAIL] DD0024: is WSL installed? exec: "wsl": executable file not found in %PATH% [FAIL] DD0025: are WSL distros installed? exec: "wsl": executable file not found in %PATH% [PASS] DD0026: is the WSL LxssManager service running? [FAIL] DD0029: is the WSL 2 Linux filesystem corrupt? exec: "wsl": executable file not found in %PATH% [FAIL] DD0035: is the VM time synchronized? exec: "wsl": executable file not found in %PATH% [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-05-16T13:04:09.271374200Z][com.docker.diagnose.exe][I] ipc.NewClient: 44227317-diagnose -> \.\pipe\dockerDiagnosticd diagnosticsd [2023-05-16T13:04:09.272047700Z][com.docker.diagnose.exe][I] (2d0973c6) 44227317-diagnose C->S diagnosticsd GET /ping [2023-05-16T13:04:09.273912500Z][com.docker.diagnose.exe][W] (2d0973c6) 44227317-diagnose C<-S NoResponse GET /ping (1.3447ms): 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-05-16T13:04:09.289127000Z][com.docker.diagnose.exe][I] ipc.NewClient: 4b43fc8d-com.docker.diagnose -> \.\pipe\dockerLifecycleServer VMDockerdAPI [2023-05-16T13:04:09.290180000Z][com.docker.diagnose.exe][I] (cad1a31d) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /docker [2023-05-16T13:04:09.291707500Z][com.docker.diagnose.exe][W] (cad1a31d) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /docker (1.5275ms): Get "http://ipc/docker": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:09.291707500Z][com.docker.diagnose.exe][I] (cad1a31d-1) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:09.293532500Z][com.docker.diagnose.exe][W] (cad1a31d-1) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (1.825ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:10.304796700Z][com.docker.diagnose.exe][I] (cad1a31d-2) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:10.306766100Z][com.docker.diagnose.exe][W] (cad1a31d-2) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (1.9694ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:11.317131000Z][com.docker.diagnose.exe][I] (cad1a31d-3) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:11.319954600Z][com.docker.diagnose.exe][W] (cad1a31d-3) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (2.8236ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:12.331913100Z][com.docker.diagnose.exe][I] (cad1a31d-4) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:12.335944900Z][com.docker.diagnose.exe][W] (cad1a31d-4) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (4.0318ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:13.339040600Z][com.docker.diagnose.exe][I] (cad1a31d-5) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:13.340208200Z][com.docker.diagnose.exe][W] (cad1a31d-5) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (1.1676ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:14.353047500Z][com.docker.diagnose.exe][I] (cad1a31d-6) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:14.991284200Z][com.docker.diagnose.exe][W] (cad1a31d-6) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (636.9569ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:16.011447600Z][com.docker.diagnose.exe][I] (cad1a31d-7) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:16.178755400Z][com.docker.diagnose.exe][W] (cad1a31d-7) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (167.3078ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-05-16T13:04:17.187673700Z][com.docker.diagnose.exe][I] (cad1a31d-8) 4b43fc8d-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-05-16T13:04:17.393927900Z][com.docker.diagnose.exe][W] (cad1a31d-8) 4b43fc8d-com.docker.diagnose C<-S NoResponse GET /ping (206.2542ms): 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": open //./pipe/docker_engine_linux: The system cannot find the file specified. [PASS] DD0013: is the $PATH ok? Error response from daemon: open \.\pipe\docker_engine_linux: 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? 2023/05/16 18:34:20 error checking if default wsl distro is running: exec: "wsl": executable file not found in %PATH%

Steps to reproduce the behavior

  1. ...
  2. ...
shreyasoti commented 1 year ago

Hello, Can someone provide the solution for this issue? I have tried multiple times for it to work but getting same error again and again. Please help me out.

yswtrue commented 1 year ago

Maybe unregister all wsl distribution, and reboot, it can help you

Walids35 commented 1 year ago

Please I have the same problem !!! Can someone help out?

Walids35 commented 1 year ago

Hii, I finally fixed the issue by uninstalling Docker and clearing all these directories:

After that I reinstall it but with an older version. I downloaded Docker version 4.15.0 and it works perfectly for me ! I hope that this could help you.

jimbo8098 commented 1 year ago

@shreyasoti the problem is that you don't have WSL installed:

2023/05/16 18:34:20 error checking if default wsl distro is running: exec: "wsl": executable file not found in %PATH%

Here's somethings to try:

  1. Open Powershell and run wsl -l -v. It will probably fail.
  2. wsl.exe is installed in C:\Windows\system32\ for me. Ensure that your $PATH variable contains this directory by running Write-Host $Env:PATH. This directory really should be in your PATH variable.
  3. Open C:\Windows\system32\ and check for wsl.exe.
  4. If you don't have WSL installed, install it! It's a Windows Feature so go into Control Panel > Search for "Programs and Features". Find Windows Subsystem for Linux and tick it. Follow the instructions.
  5. Try to open Docker Desktop again. I expect it should work.

As for how it's become removed in the first place, it may have been:

yswtrue commented 1 year ago

I fixed by edit file C:\Users\[USERNAME]\AppData\Roaming\Docker\settings.json like these, and then restart windows, it should fix this problem

{
  "enableIntegrationWithDefaultWslDistro": false,
  "integratedWslDistros": []
}
jimbo8098 commented 1 year ago

wsl isn't in OP's PATH so I doubt it, however that might actually fix my issue 😂

shreyasoti commented 1 year ago

@jimbo8098, I have tried with the steps you mentioned but still I am getting the following error: "WSL integration with distro Ubuntu-22.04 unexpectedly stopped with exit code 1. Do you want to restart it?" Even after restarting it this error keeps on coming and eventually the docker desktop is getting timed out.

faddaful commented 1 year ago

Hello, I have finally fixed the issue as @Walids35 suggested by uninstalling Docker and clearing all these directories: %APPDATA%\Docker %USERPROFILE%\AppData\Local\Docker The directories can be cleared by searching run, then type "%temp% to locate all temp files. Located docker files and deleted it.

After that I reinstalled it but with an older version. I downloaded Docker version 3.6.0 and it works perfectly. I hope that this can help you.

shreyasoti commented 1 year ago

@yswtrue, I have followed the step which you suggested but the docker desktop is still not loading; It's stuck on the startup screen "Docker engine is starting" from last 10 minutes.

shreyasoti commented 1 year ago

@Walids35, can you please let me know from where I can download an older version of docker?

faddaful commented 1 year ago

@shreyasoti Although you didn't mention me, but you can download older versions from here https://docs.docker.com/desktop/previous-versions/3.x-windows/ Hope that helps.

shreyasoti commented 1 year ago

@shreyasoti Although you didn't mention me, but you can download older versions from here https://docs.docker.com/desktop/previous-versions/3.x-windows/ Hope that helps.

Thank you so much for the help!!

jimbo8098 commented 1 year ago

I don't expect you to have any positive experience using the older version. The problem here is quite simply that the WSL container is crashing - as the error says. Since it's Ubuntu that's crashing, it is a supplemental container which is configured to have the WSL integration enabled. My suggestion would be to go into C:\Users\<user>\AppData\Roaming\Docker\settings.json then setting the options:

If you still have issues, please try the following:

Let us know how you get on but I think editing the settings file will probably resolve it.

Darkbelg commented 1 year ago

Can you check the virtual hdd space of the distro?