docker / for-win

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

Docker Desktop wsl unexpected error #14151

Open Tufailahmed-Bargir opened 3 months ago

Tufailahmed-Bargir commented 3 months ago

Description

previously docker use to run correctly now it is showing error image

Reproduce

1) open docker desktop 2) i see the error

Expected behavior

docker must run without errors

docker version

Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.1.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        4cf5afa
 Built:             Tue Apr 30 11:48:43 2024
 OS/Arch:           windows/amd64
 Context:           default

docker info

Client:
 Version:    26.1.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.0-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.29
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.23
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.8.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.45/info": open //./pipe/docker_engine: The system cannot find the file specified.
errors pretty printing info

Diagnostics ID

15E882E2-3C0E-421A-9C23-3A7C383D1DF5/20240620103848

Additional Info

the error i am getting

deploying WSL2 distributions

provisioning docker WSL distros: ensuring main distro is deployed: checking if main distro is up to date: checking main distro bootstrap version: getting main distro bootstrap version: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe -d docker-desktop -u root -e wsl-bootstrap version: Failed to attach disk '\AppData\Local\Docker\wsl\main\ext4.vhdx' to WSL2: The system cannot find the file specified. Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND : exi

andrea-reale commented 3 months ago

Thanks for reporting this.

It looks like the docker-desktop WSL2 distribution got itself in a undefined state.

While we look more into the issue, you can remediate by doing from the command line:

> wsl.exe --unregister docker-desktop

(note: this is docker-desktop and not docker-desktop-data. Unregistering docker-desktop-data would cause data loss).

inoyakaigor commented 3 months ago

@andrea-reale Hi! I've run in the same issue. I've try to fix it with reinstall v 4.31.1 but it isn't helps. My job is paralized. Where I can download previous version?

WarDroid23 commented 3 months ago

docker login

techevolution26 commented 3 months ago

I have the same same problem too

diyagangwar-dell commented 3 months ago

I am also getting a similar error, when I try launching docker i get this error

Screenshot 2024-06-24 123149

additionally I tried to manually asses the problem and it says: Please investigate the following 1 issue:

1 : The test: are WSL distros installed? Failed with: WSL Distribution docker-desktop is missing

however I have wsl downloaded: wsl --version WSL version: 2.2.4.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.61 MSRDC version: 1.2.5326 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26091.1-240325-1447.ge-release Windows version: 10.0.22621.3737

andrea-reale commented 3 months ago

Hi @diyagangwar-dell ,

sorry for the bad experience you are having. As it seems that automatic collection of diangostics does not work, I would really appreciate if you could manually make a zip of the %LOCALAPPDATA/Docker/log (this usually is C: Users\<USER>\AppData\Local\Docker\log) folder and upload it to this ticket, so we can take a better look at what is going on. Thank you

Mostafahassen1 commented 2 months ago

شكرا للإبلاغ عن هذا.

يبدو أن توزيع WSL2 لسطح المكتب قد وصل إلى حالة غير محددة.

بينما ننظر أكثر في هذه المشكلة، يمكنك علاجها عن طريق القيام بذلك من سطر الأوامر:

> wsl.exe --unregister docker-desktop

(note: هذا هو docker-desktop و لا دوكر-سطح المكتب-البيانات. إلغاء التسجيل docker-desktop-data من شأنه أن يسبب فقدان البيانات).

how can solve that
PS C:\Windows\system32> wsl.exe --unregister docker-desktop Unregistering. There is no distribution with the supplied name. Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND