docker / for-win

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

Win10 - A timeout occured while waiting for a WSL integration #13357

Open VcSaJen opened 1 year ago

VcSaJen commented 1 year ago

Actual behavior

Docker for Windows suddenly refuses to start for me, it says:

An unexpected error occurred A timeout occured while waiting for a WSL integration agent to become ready.

This can occur when starting after an abrupt termination. To work around the issue, please terminate WSL (wsl --shutdown) and start Docker Desktop again. If the issue persists please collect diagnostics and submit an issue (Overview ).

Error details: 1 error occurred:

  • starting WSL integration service: synchronising agents: starting added distros: 1 error occurred:
  • waiting for WSL integration for Ubuntu: waiting for WSL distro integration to become ready in “Ubuntu”: timeout

Expected behavior

Docker for Windows working.

Information

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

[2023-04-03T13:36:53.901121200Z][com.docker.diagnose][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0002: does the bootloader have virtualization enabled?
[SKIP] DD0018: does the host support virtualization?
[FAIL] DD0001: is the application running? Docker is not 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-04-03T13:37:09.545430100Z][com.docker.diagnose][I] ipc.NewClient: 6a25baf5-diagnose -> \\.\pipe\dockerDiagnosticd diagnosticsd
[2023-04-03T13:37:09.545430100Z][com.docker.diagnose][I] (86dbc38a) 6a25baf5-diagnose C->S diagnosticsd GET /ping
[2023-04-03T13:37:09.545984600Z][com.docker.diagnose][W] (86dbc38a) 6a25baf5-diagnose C<-S NoResponse GET /ping (554.5µ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-04-03T13:37:09.546502200Z][com.docker.diagnose][I] ipc.NewClient: 9eb09294-com.docker.diagnose -> \\.\pipe\dockerLifecycleServer VMDockerdAPI
[2023-04-03T13:37:09.546502200Z][com.docker.diagnose][I] (753ff3a0) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /docker
[2023-04-03T13:37:09.547019500Z][com.docker.diagnose][W] (753ff3a0) 9eb09294-com.docker.diagnose C<-S NoResponse GET /docker (517.3µs): Get "http://ipc/docker": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:09.547019500Z][com.docker.diagnose][I] (753ff3a0-1) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:09.547536700Z][com.docker.diagnose][W] (753ff3a0-1) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (517.2µs): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:10.549128800Z][com.docker.diagnose][I] (753ff3a0-2) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:10.549715300Z][com.docker.diagnose][W] (753ff3a0-2) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (586.5µs): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:11.551669000Z][com.docker.diagnose][I] (753ff3a0-3) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:11.551669000Z][com.docker.diagnose][W] (753ff3a0-3) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:12.553254700Z][com.docker.diagnose][I] (753ff3a0-4) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:12.553254700Z][com.docker.diagnose][W] (753ff3a0-4) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:13.555527900Z][com.docker.diagnose][I] (753ff3a0-5) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:13.555527900Z][com.docker.diagnose][W] (753ff3a0-5) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:14.570843200Z][com.docker.diagnose][I] (753ff3a0-6) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:14.570843200Z][com.docker.diagnose][W] (753ff3a0-6) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:15.572531000Z][com.docker.diagnose][I] (753ff3a0-7) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:15.572531000Z][com.docker.diagnose][W] (753ff3a0-7) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \\.\pipe\dockerLifecycleServer: The system cannot find the file specified.
[2023-04-03T13:37:16.574756500Z][com.docker.diagnose][I] (753ff3a0-8) 9eb09294-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2023-04-03T13:37:16.574756500Z][com.docker.diagnose][W] (753ff3a0-8) 9eb09294-com.docker.diagnose C<-S NoResponse GET /ping (0s): 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?
[FAIL] DD0038: is the connection to Docker working? HTTP GET https://login.docker.com: Get "https://login.docker.com": proxyconnect tcp: open \\.\pipe\dockerHTTPProxy: The system cannot find the file specified.
[FAIL] DD0014: are the backend processes running? 4 errors occurred:
        * com.docker.vpnkit.exe is not running
        * com.docker.proxy.exe is not running
        * com.docker.wsl-distro-proxy.exe is not running
        * com.docker.backend.exe is not running

[FAIL] DD0007: is the backend responding? failed to ping com.docker.backend with error: Get "http://ipc/ping": open \\.\pipe\dockerBackendApiServer: The system cannot find the file specified.
[2023-04-03T13:37:22.614037800Z][com.docker.diagnose][I] ipc.NewClient: e2ad70c7-diagnose -> \\.\pipe\dockerBackendApiServer BackendAPI

Steps to reproduce the behavior

  1. Update Docker
  2. Launch Docker
Chebura commented 1 year ago

I have same issue after updated docker desktop today (4.18.0). 4.17.1 works fine afer downgrade.

chewcw commented 1 year ago

I'm having this error and spent last few hours troubleshooting this while still no clues. Switched to podman and everything works like a charm, super easy to setup. Will continue to come back to this if there is any solution.

apexDev37 commented 1 year ago

I had the exact same error when Docker desktop was attempting to start.

Below are some attempts I made to resolve the issue with no outcome:

  1. Try restart WSL2 - wsl --shutdown
  2. Try update WSL2 - wsl --update & wsl.exe --update --pre-release
  3. Restarting windows
  4. Updating windows (lol)
  5. Restarting the LsxxManager - Get-Service LxssManager | Restart-Service
  6. Literally every solution shared here

NB: All the above commands were run in Powershell with administrative rights.

After 2 days, this worked for me.

Solution: I removed the .wslconfig file I added to the path C:\Users\<username>

I added this file to limit the insane amounts of memory Docker was consuming on WSL2. More details here

After I updated Docker to v4.18.0 it appears that the applied memory allocation constrained the new update from launching. Once I deleted the .wslconfig file, Docker started smoothly.

Version details for my machine:

amitkumarhq commented 1 year ago

I'm also having the same issue after updating to Docker version 20.10.24, build 297e128 image

barzagli commented 1 year ago

I had the same problem just have found a solution that worked for me and might help others too.

Navigate to C:\Users\USERNAME\Appdata\Roaming\Docker

Open the settings file(JSON file) and make sure the following are set this way:

"integratedWslDistros" : [ ] "enableIntegrationWithDefaultWslDistro" : false,

Save the changes and restart docker desktop.

https://forums.docker.com/t/win10-a-timeout-occured-while-waiting-for-a-wsl-integration/135211/2

Credits ain't mine's

bobeu commented 1 year ago

@barzagli Thank you for the find. The solution was a perfect one for the problem. I have been facing similar issues for months. I had to forfeit a program all because I could not complete the docker setup. This solution easily fixes the problem for me. I am really very excited atm.

AchieverKing commented 1 year ago

@amitkumarhq please how did you solve the issue with WSL integration agent timeout. i am kind of stocked Thanks in advance.

barzagli commented 1 year ago

bobeu

Glad that I could help somehow, after reading the documentation what I've realized is, we have two options for backend 1st is WSL and 2nd is to use Hyper-V. So, I've decided to reinstall Docker Desktop own my own and run some tests. I've uninstall all WSL dependencies and I've also uninstalled virtual machine platform and windows hypervisor platform using "Turn Windows Features on or off" leaving only Hyper-V installed as my choice of backend handler. During the Docker Desktop setup, I've unchecked the option to use WSL (recommend) and now is up and running.

amitkumarhq commented 1 year ago

@amitkumarhq please how did you solve the issue with WSL integration agent timeout. i am kind of stocked Thanks in advance.

I just followed the solution given by @barzagli (https://github.com/docker/for-win/issues/13357#issuecomment-1515724479)

AchieverKing commented 1 year ago

Thanks I got it solved by changing WSL integration distribution to false. I navigate using command line to open appdata/roaming/docker/settings.json. it's in one of the solution provided at the comment section.

On Fri, Apr 21, 2023, 7:09 AM Amit Kumar @.***> wrote:

@amitkumarhq https://github.com/amitkumarhq please how did you solve the issue with WSL integration agent timeout. i am kind of stocked Thanks in advance.

I just followed the solution given by @barzagli https://github.com/barzagli (#13357 (comment) https://github.com/docker/for-win/issues/13357#issuecomment-1515724479)

— Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/13357#issuecomment-1517313159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWSQMHXGRUG2R5JYBT4DHO3XCIQAZANCNFSM6AAAAAAWRLMMCM . You are receiving this because you commented.Message ID: @.***>

VcSaJen commented 1 year ago

Personally I uninstalled Docker Desktop, enabled systemd on my WSL distro, then installed Docker Engine inside of WSL.

LeviPesin commented 1 year ago

Open the settings file(JSON file) and make sure the following are set this way:

"integratedWslDistros" : [ ] "enableIntegrationWithDefaultWslDistro" : false,

But I need Docker to be integrated with the default distro. This is the only way I'm using Docker. What should I do?

LeviPesin commented 1 year ago

I think I finally found the proper workaround:

1) wsl --shutdown, 2) Set "enableIntegrationWithDefaultWslDistro" : false, 3) Launch Docker Desktop, 4) Go to the settings and enable integration, click "apply & restart" button.

LeviPesin commented 1 year ago

Described that solution (that preserves WSL integration) in https://github.com/docker/for-win/issues/13426.

NatanimA commented 1 year ago

I had the same problem just have found a solution that worked for me and might help others too.

Navigate to C:\Users\USERNAME\Appdata\Roaming\Docker

Open the settings file(JSON file) and make sure the following are set this way:

"integratedWslDistros" : [ ] "enableIntegrationWithDefaultWslDistro" : false,

Save the changes and restart docker desktop.

https://forums.docker.com/t/win10-a-timeout-occured-while-waiting-for-a-wsl-integration/135211/2

Credits ain't mine's

Thank you , you have saved me a lot of time 👍🏼

abhishekbhakat commented 1 year ago

But then this starts to fail as soon as we try to integrate with a wsl distro.

LeviPesin commented 1 year ago

But then this starts to fail as soon as we try to integrate with a wsl distro.

See https://github.com/docker/for-win/issues/13426.

amitkumarhq commented 1 year ago

Solved

The latest update, Docker Desktop 4.19.0 (106363) fixes this issue. I can now enable integration with my WSL distros and still work with start Docker Desktop just fine.

What did I change?

I just enabled this option under Use WSL 2 based engine

Add *.docker.internal names to the host's etc/hosts file

image

yurifilgueira commented 1 year ago

I had the same problem just have found a solution that worked for me and might help others too.

Navigate to C:\Users\USERNAME\Appdata\Roaming\Docker

Open the settings file(JSON file) and make sure the following are set this way:

"integratedWslDistros" : [ ] "enableIntegrationWithDefaultWslDistro" : false,

Save the changes and restart docker desktop.

https://forums.docker.com/t/win10-a-timeout-occured-while-waiting-for-a-wsl-integration/135211/2

Credits ain't mine's

@barzagli Omg man, thank you so much.

Gustvss commented 1 year ago

Eu tive o mesmo problema, apenas encontrei uma solução que funcionou para mim e pode ajudar outras pessoas também.

Navegue até C:\Users\USERNAME\Appdata\Roaming\Docker

Abra o arquivo de configurações (arquivo JSON) e verifique se o seguinte está definido desta forma:

"integratedWslDistros": [] "enableIntegrationWithDefaultWslDistro": falso,

Salve as alterações e reinicie a área de trabalho do Docker.

https://forums.docker.com/t/win10-a-timeout-occured-while-waiting-for-a-wsl-integration/135211/2

Os créditos não são meus

Obrigado! Funcionou hoje comigo 13/05/2023 na versão 4.19.0