docker / for-win

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

Docker WSL2 stopped working after the windows update #13308

Open BenokanDeepBlue opened 1 year ago

BenokanDeepBlue commented 1 year ago

Actual behavior

WSL 2 timeout error

The operation timed out because a response was not received from the virtual machine or container. Error code: Wsl/Service/CreateInstance/HCS_E_CONNECTION_TIMEOUT

Expected behavior

WSL 2 was running perfectly until the update.

Information

Another issue created by me with some extra information [(https://github.com/microsoft/WSL/issues/9795)] After Cumulative Update (KB5023706) and Wsl2 application, docker desktop application versions are updated. Now I'm running into this problem. I've important files that I need to access saved in the localState and I can not even export them as .tar

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

C:\Program Files\Docker\Docker\resources>com.docker.diagnose.exe check [2023-03-16T12:41:20.043361300Z][com.docker.diagnose.exe][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? [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? [FAIL] DD0029: is the WSL 2 Linux filesystem corrupt? [ 33.286910] EXT4-fs error (device sdd): ext4_put_super:1188: comm Xwayland: Couldn't clean up the journal [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-16T12:41:23.224221300Z][com.docker.diagnose.exe][I] ipc.NewClient: aed6ed6b-diagnose -> \.\pipe\dockerDiagnosticd diagnosticsd [2023-03-16T12:41:23.224785100Z][com.docker.diagnose.exe][I] (b6e9fa03) aed6ed6b-diagnose C->S diagnosticsd GET /ping [2023-03-16T12:41:23.224785100Z][com.docker.diagnose.exe][W] (b6e9fa03) aed6ed6b-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-16T12:41:23.225813900Z][com.docker.diagnose.exe][I] ipc.NewClient: b4149734-com.docker.diagnose -> \.\pipe\dockerLifecycleServer VMDockerdAPI [2023-03-16T12:41:23.225868600Z][com.docker.diagnose.exe][I] (e4ad15bd) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /docker [2023-03-16T12:41:23.225868600Z][com.docker.diagnose.exe][W] (e4ad15bd) b4149734-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-16T12:41:23.226425100Z][com.docker.diagnose.exe][I] (e4ad15bd-1) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:23.226425100Z][com.docker.diagnose.exe][W] (e4ad15bd-1) b4149734-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-16T12:41:24.239893200Z][com.docker.diagnose.exe][I] (e4ad15bd-2) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:24.239893200Z][com.docker.diagnose.exe][W] (e4ad15bd-2) b4149734-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-16T12:41:25.240982600Z][com.docker.diagnose.exe][I] (e4ad15bd-3) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:25.241490900Z][com.docker.diagnose.exe][W] (e4ad15bd-3) b4149734-com.docker.diagnose C<-S NoResponse GET /ping (614.6µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-03-16T12:41:26.242236800Z][com.docker.diagnose.exe][I] (e4ad15bd-4) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:26.242236800Z][com.docker.diagnose.exe][W] (e4ad15bd-4) b4149734-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-16T12:41:27.243221400Z][com.docker.diagnose.exe][I] (e4ad15bd-5) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:27.243767400Z][com.docker.diagnose.exe][W] (e4ad15bd-5) b4149734-com.docker.diagnose C<-S NoResponse GET /ping (546µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-03-16T12:41:28.246112300Z][com.docker.diagnose.exe][I] (e4ad15bd-6) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:28.247378800Z][com.docker.diagnose.exe][W] (e4ad15bd-6) b4149734-com.docker.diagnose C<-S NoResponse GET /ping (1.2665ms): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-03-16T12:41:29.262877500Z][com.docker.diagnose.exe][I] (e4ad15bd-7) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:29.263132200Z][com.docker.diagnose.exe][W] (e4ad15bd-7) b4149734-com.docker.diagnose C<-S NoResponse GET /ping (254.7µs): Get "http://ipc/ping": open \.\pipe\dockerLifecycleServer: The system cannot find the file specified. [2023-03-16T12:41:30.264969300Z][com.docker.diagnose.exe][I] (e4ad15bd-8) b4149734-com.docker.diagnose C->S VMDockerdAPI GET /ping [2023-03-16T12:41:30.264969300Z][com.docker.diagnose.exe][W] (e4ad15bd-8) b4149734-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? [PASS] DD0038: is the connection to Docker working? [FAIL] DD0014: are the backend processes running? 2 errors occurred:

[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-16T12:41:32.455300800Z][com.docker.diagnose.exe][I] ipc.NewClient: 1cdc1f19-diagnose -> \.\pipe\dockerDesktopLinuxEngine Proxy [2023-03-16T12:41:32.455300800Z][com.docker.diagnose.exe][I] (258eb1c7) 1cdc1f19-diagnose C->S Proxy GET /desktop-diagnostics/ping [2023-03-16T12:41:32.455804000Z][com.docker.diagnose.exe][W] (258eb1c7) 1cdc1f19-diagnose C<-S NoResponse GET /desktop-diagnostics/ping (503.2µs): Get "http://ipc/desktop-diagnostics/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:32.455856800Z][com.docker.diagnose.exe][I] (258eb1c7-1) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:32.455856800Z][com.docker.diagnose.exe][W] (258eb1c7-1) 1cdc1f19-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:33.463340600Z][com.docker.diagnose.exe][I] (258eb1c7-2) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:33.464680100Z][com.docker.diagnose.exe][W] (258eb1c7-2) 1cdc1f19-diagnose C<-S NoResponse GET /ping (1.5001ms): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:34.466617200Z][com.docker.diagnose.exe][I] (258eb1c7-3) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:34.467130500Z][com.docker.diagnose.exe][W] (258eb1c7-3) 1cdc1f19-diagnose C<-S NoResponse GET /ping (513.3µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:35.467502700Z][com.docker.diagnose.exe][I] (258eb1c7-4) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:35.467747700Z][com.docker.diagnose.exe][W] (258eb1c7-4) 1cdc1f19-diagnose C<-S NoResponse GET /ping (245µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:36.468818300Z][com.docker.diagnose.exe][I] (258eb1c7-5) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:36.468818300Z][com.docker.diagnose.exe][W] (258eb1c7-5) 1cdc1f19-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:37.484685400Z][com.docker.diagnose.exe][I] (258eb1c7-6) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:37.484826900Z][com.docker.diagnose.exe][W] (258eb1c7-6) 1cdc1f19-diagnose C<-S NoResponse GET /ping (141.5µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:38.486766300Z][com.docker.diagnose.exe][I] (258eb1c7-7) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:38.487079200Z][com.docker.diagnose.exe][W] (258eb1c7-7) 1cdc1f19-diagnose C<-S NoResponse GET /ping (312.9µs): Get "http://ipc/ping": open \.\pipe\dockerDesktopLinuxEngine: The system cannot find the file specified. [2023-03-16T12:41:39.487962600Z][com.docker.diagnose.exe][I] (258eb1c7-8) 1cdc1f19-diagnose C->S Proxy GET /ping [2023-03-16T12:41:39.487962600Z][com.docker.diagnose.exe][W] (258eb1c7-8) 1cdc1f19-diagnose C<-S NoResponse GET /ping (112.1µ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? [WARN] DD0029: is the WSL 2 Linux filesystem corrupt? [ 33.286910] EXT4-fs error (device sdd): ext4_put_super:1188: comm Xwayland: Couldn't clean up the journal [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 5 warnings:

1 : The check: is the WSL 2 Linux filesystem corrupt? Produced the following warning: [ 33.286910] EXT4-fs error (device sdd): ext4_put_super:1188: comm Xwayland: Couldn't clean up the journal

If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .

Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.

2 : 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.

3 : 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.

4 : 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.

5 : 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 1 issue:

1 : The test: is the WSL 2 Linux filesystem corrupt? Failed with: [ 33.286910] EXT4-fs error (device sdd): ext4_put_super:1188: comm Xwayland: Couldn't clean up the journal

If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .

Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.

Steps to reproduce the behavior

  1. ...
  2. ...
maikebing commented 1 year ago

me too

maikebing commented 1 year ago

https://github.com/docker/for-win/issues/13321

PeterOgden-Intechnica commented 1 year ago

I had this problem this morning. When I listed my WSL drives with fdisk -l it showed that the disk docker reports in DD0029 doesn't exist.

PeterOgden-Intechnica commented 1 year ago

I went to the docker Troubleshoot menu and used Clean / Purge data and this seems to have at least moved my issue forward because now the diagnostics pass DD0029 but its also hanging further down so this may not be a complete fix.

BenokanDeepBlue commented 1 year ago

The problem on my end is I have my thesis inside wsl, and I'm locked out, so probably I can not clean/purge data...

PeterOgden-Intechnica commented 1 year ago

It didn't fix it anyway, after docker attempted a restart I get the same issue.

PeterOgden-Intechnica commented 1 year ago

I was finally able to fix this. It is an issue with the WSL2 backed virtual drives as suspected. I deleted mine manually by stopping docker and removing it. Starting after this, I got an error asking me to unregister the drive in Powershell and then after running the provided command, Docker was working again almost immediately so I think a long hanging start-up is also a symptom of this. @BenokanDeepBlue the file containing the data was stored at C:\Users\<MyUserName>\AppData\Local\Docker\wsl\data\ext4.vhdx so presumably you can recover its content outside docker first?

BenokanDeepBlue commented 1 year ago

@PeterOgden-Intechnica Thanks a lot for your update! I already saved the vhdx and uploaded it to the cloud but the problem is I am not sure how to open and access the content. Because in order to open it I had to use wsl related commands again and none of them worked since wsl couldn't be started properly by docker. So if I save the already corrupted vhdx and unregister it I'm not sure if it'll be accessible later.

maikebing commented 1 year ago

Don't use the WSL 2 based engine! Docker will work !

lightyfr commented 1 year ago

can't if your on windows home

Don't use the WSL 2 based engine! Docker will work !

maikebing commented 1 year ago

https://github.com/docker/for-win/issues/13340

artm commented 1 year ago

Don't use the WSL 2 based engine! Docker will work !

can't if most of the workflow is in WSL2