docker / for-win

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

Docker-Desktop Unexpected WSL Error #14144

Open owoeye-babatunde opened 1 week ago

owoeye-babatunde commented 1 week ago

Description

Docker Desktop crashes everytime it tries to start.

Reproduce

  1. Start PC
  2. Run Docker Desktop for Windows
  3. Docker Desktop crashes with error
  4. After a further minute or so it force quits

Expected behavior

Docker for Desktop runs correctly

docker version

Client:
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.3
 Git commit:        24.0.5-0ubuntu1~20.04.1
 Built:             Mon Aug 21 19:50:14 2023
 OS/Arch:           linux/amd64
 Context:           default
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

docker info

Client:
 Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-buildx" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-buildx: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-compose" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-compose: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-dev" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-dev: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-extension" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-extension: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-sbom" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-sbom: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-scan" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-scan: no such file or directory

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?     
errors pretty printing info

Diagnostics ID

A879467D-2751-49CC-AC23-6FAC6D45298D/20240618101705

Additional Info

The command 'docker-compose' could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings.

For details about using Docker Desktop with WSL 2, visit:

https://docs.docker.com/go/wsl2/

I tried to reinstall WSL2 but issue persists.

voonyee commented 1 week ago

hi, thanks for reporting this. In the logs provided, I do see the following: [2024-06-17T18:35:46.126301000Z][com.docker.backend.exe.engines][E] engine was terminated with result: waiting for the VM setup to be ready: checking preconditions: WSL update required

Can you please ensure that the WSL version is updated? You can update your WSL by running this command: wsl --update

aravindk777 commented 1 week ago

hi, thanks for reporting this. In the logs provided, I do see the following: [2024-06-17T18:35:46.126301000Z][com.docker.backend.exe.engines][E] engine was terminated with result: waiting for the VM setup to be ready: checking preconditions: WSL update required

Can you please ensure that the WSL version is updated? You can update your WSL by running this command: wsl --update

This doesnt work on machines where corporate devices doesnt have admin account type access to employee user accounts. And on some corporate machines where windows appstore is blocked and this wsl --update is requiring that access. I wonder why does the docker-admin always runs this. Can it not simply check if the WSL is updated and dont attempt to update everytime it runs as a non-admin account type?