docker / for-win

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

Docker Desktop - Unexpected WSL error. An unexpected error was encountered while executing a WSL command. Common causes include access rights issues, which occur after waking the computer or not being connected to your domain/active directory. Please try shutting WSL down (wsl -- shutdown) and/or rebooting your computer. If not sufficient, WSL may need to be reinstalled fully. As a last resort, try to uninstall/reinstall Docker Desktop. If the issue persists please collect diagnostics and submit an issue (https://docs.docker.com/desktop/troubleshoot/overview/#diagnose-from-the-terminal). #13915

Open rikvik2006 opened 7 months ago

rikvik2006 commented 7 months ago

Description

When I try to start Docker Desktop, the program gives this error. Docker was running on this computer more or less 3 months ago. After three months of not opening it, I found this problem.

Error Message

Screenshot 2024-02-13 154257

Docker Desktop - Unexpected WSL error

An unexpected error was encountered while executing a WSL command. Common causes include access rights issues, which occur after waking the computer or not being connected to your domain/active directory.

Please try shutting WSL down (wsl -- shutdown) and/or rebooting your computer. If not sufficient, WSL may need to be reinstalled fully. As a last resort, try to uninstall/reinstall Docker Desktop. If the issue persists please collect diagnostics and submit an issue (https://docs.docker.com/desktop/troubleshoot/overview/#diagnose-from-the-terminal).

I followed all the steps set out in these 2 issues: #13845, #13273, but they did not help.

Many people say that I have to activate the Windows Hyper-V and Windows Hypervisor Plattform functionalities, but I have never activated these two functionalities, and 3 months ago docker was working, whereas now it no longer works. I tried to activate the Hyper-V functionality but there was no positive response

These are the functionalities I have active at the moment: image The image shows text in Italian, but the underlined features are the ones I have heard most about and respectively are:

WSL Version

$ wsl --version
Versione WSL: 2.0.9.0
Versione kernel: 5.15.133.1-1
Versione WSLg: 1.0.59
Versione MSRDC: 1.2.4677
Versione Direct3D: 1.611.1-81528511
Versione DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Versione di Windows: 10.0.22622.450

Right now I have no distribution installed, I only have WSL installed

I also tried uninstalling and reinstalling docker-desktop, but it did not help.

I noticed that running the docker version command in powershell gives me this error:

error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.

Reproduce

Start the Docker Desktop application on windows 11

Expected behavior

The desktop docker application should open normally, without giving any errors

docker version

error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
Client:
 Cloud integration: v1.0.35+desktop.10
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:24:09 2024
 OS/Arch:           windows/amd64
 Context:           default

docker info

Client:
 Version:    25.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1-desktop.4
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.3-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container. (Docker Inc.)
    Version:  0.0.22
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.21
    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.0.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.3.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.24/info": open //./pipe/docker_engine: The system cannot find the file specified.
errors pretty printing info

Diagnostics ID

30E45A5D-1CAA-4F4D-B567-C4CB178BD9F3/20240213144728

Additional Info

Diagnostic file: diagnostics.log log.txt self-diagnose.txt

rikvik2006 commented 7 months ago

I installed the Ubuntu distribution on the WSL, but when I start it it gives me this error. image

$ ubuntu
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070570
Error: 0x80070570 La directory o il file Þ danneggiato e illeggibile.

Press any key to continue...

The third line is in Italian, the English translation is this: The directory or file is damaged and unreadable.

Furthermore, even though I installed Ubuntu with the command wsl --install Ubuntu the WSL does not seem to find Ubuntu as installed.

# wsl --list
Sottosistema Windows per Linux non ha distribuzioni installate.

Usare 'wsl.exe --list --online' per elencare le distribuzioni disponibili
e 'wsl.exe --install <Distro>' per l'installazione.

È anche possibile installare le distribuzioni visitando il Microsoft Store:
https://aka.ms/wslstore
Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

But if I then try to install Ubuntu with the respective command wsl --install Ubuntu, it says it is already installed but then gives an error during start-up

# wsl --install Ubuntu
Ubuntu è già installato.
Avvio di Ubuntu in corso...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070570
Error: 0x80070570 La directory o il file Þ danneggiato e illeggibile.

Press any key to continue...
Operazione completata.

Respective translation:

Ubuntu is already installed
Ubuntu booting in progress
...
...
Error: 0x80070570 The directory or file is damaged and unreadable.

...
Operation completed
PaulMarisOUMary commented 7 months ago

I'm not certain if this will be helpful, but I encountered a similar issue yesterday. I resolved it by terminating any VM-related processes in my task manager, then attempted to reopen Docker. After that, I proceeded to update Docker and restarted the application.

lightsing commented 6 months ago

same

Diagnostics ID E77851FC-5200-44B9-B191-A7E20928570D/20240220025350

zxbeltm commented 5 months ago

I have the same error!!!

laykayfals commented 4 months ago

Same error too!!!

Sahil-Khowaja commented 2 months ago

I installed the Ubuntu distribution on the WSL, but when I start it it gives me this error. image

$ ubuntu
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070570
Error: 0x80070570 La directory o il file Þ danneggiato e illeggibile.

Press any key to continue...

The third line is in Italian, the English translation is this: The directory or file is damaged and unreadable.

Furthermore, even though I installed Ubuntu with the command wsl --install Ubuntu the WSL does not seem to find Ubuntu as installed.

# wsl --list
Sottosistema Windows per Linux non ha distribuzioni installate.

Usare 'wsl.exe --list --online' per elencare le distribuzioni disponibili
e 'wsl.exe --install <Distro>' per l'installazione.

È anche possibile installare le distribuzioni visitando il Microsoft Store:
https://aka.ms/wslstore
Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

But if I then try to install Ubuntu with the respective command wsl --install Ubuntu, it says it is already installed but then gives an error during start-up

# wsl --install Ubuntu
Ubuntu è già installato.
Avvio di Ubuntu in corso...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070570
Error: 0x80070570 La directory o il file Þ danneggiato e illeggibile.

Press any key to continue...
Operazione completata.

Respective translation:

Ubuntu is already installed
Ubuntu booting in progress
...
...
Error: 0x80070570 The directory or file is damaged and unreadable.

...
Operation completed

did you fix it? help me pls i am getting this error too

rikvik2006 commented 2 months ago

@Sahil-Khowaja I'm sorry but I didn't find any solution to the problem. The only possible solution I have found (which I have not tried) is to reinstall windows. It should be enough to reinstall Windows while keeping the apps, this way you shouldn't lose your data. Just remember to back up all your files before reinstalling Windows

Please do not close this issue. Such a solution is clearly not acceptable.

Let me know if it works

Sahil-Khowaja commented 1 month ago

Thanks for your suggestion. I wanted to let you know that instead of reinstalling Windows, I decided to install Ubuntu directly on my local machine. This approach has worked well for me, and I'm now using Docker without any issues.