for-win icon indicating copy to clipboard operation
for-win copied to clipboard

After update on Docker, WSL 2 does not work correct

Open danielterziev92 opened this issue 1 year ago • 9 comments

Description

Diagnostics ID: 248CDEBF-8B39-4885-9B97-E7213B822BFC/20230703184858

Reproduce

.\com.docker.diagnose.exe gather -upload

Expected behavior

No response

docker version

Cloud integration: v1.0.35
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:53:15 2023
 OS/Arch:           windows/amd64
 Context:           default

docker info

Client:
 Version:    24.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.19.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.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.20
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    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
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.16.1
    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

248CDEBF-8B39-4885-9B97-E7213B822BFC/20230703184858

Additional Info

When start the Docker Desktop get this Issue Screenshot 2023-07-03 215820

danielterziev92 avatar Jul 03 '23 18:07 danielterziev92

I think I had the same issue. Yesterday I updated Docker Desktop from 4.20.1 to 4.21.0. I did not do a restart after the upgrade and everything worked fine. When starting the notebook today the "unexpected WSL error" dialog was shown. When trying to execute WSL (Ubuntu) I received "WslRegisterDistribution failed with error 0x80073cfc".

Downloading the latest WSL release (msixbundle) from https://github.com/microsoft/WSL/releases and selecting the update option fixed it for me. After a restart WSL and Docker work again.

n0v1 avatar Jul 04 '23 07:07 n0v1

I think I had the same issue. Yesterday I updated Docker Desktop from 4.20.1 to 4.21.0. I did not do a restart after the upgrade and everything worked fine. When starting the notebook today the "unexpected WSL error" dialog was shown. When trying to execute WSL (Ubuntu) I received "WslRegisterDistribution failed with error 0x80073cfc".

Downloading the latest WSL release (msixbundle) from https://github.com/microsoft/WSL/releases and selecting the update option fixed it for me. After a restart WSL and Docker work again.

Thank you so much, this bypass solved my problem! I haven't been able to fix my docker desktop for 3 long days. You saved me,

Thank you!

ToshiNamura avatar Dec 16 '23 22:12 ToshiNamura

I updated everything, but it didn't work until I activated the CPU-SVM from the BIOS.

kamal997 avatar Dec 29 '23 16:12 kamal997

I updated everything, but it didn't work until I activated the CPU-SVM from the BIOS.

Same here. I had to enable CPU virtualization in BIOS and then it started working. Have in mind that this was the first time I installed Docker Desktop in my machine. For the other people that it stopped working, probably the update of WSL will fix it.

RinorMehmeti avatar Jan 02 '24 20:01 RinorMehmeti

I updated everything, but it didn't work until I activated the CPU-SVM from the BIOS.

Thanks it helped to mee too. So it seems like SVM mode has to be turned on to work with docker in amd proccessors

idkthisnik avatar Jan 11 '24 12:01 idkthisnik

I think I had the same issue. Yesterday I updated Docker Desktop from 4.20.1 to 4.21.0. I did not do a restart after the upgrade and everything worked fine. When starting the notebook today the "unexpected WSL error" dialog was shown. When trying to execute WSL (Ubuntu) I received "WslRegisterDistribution failed with error 0x80073cfc".

Downloading the latest WSL release (msixbundle) from https://github.com/microsoft/WSL/releases and selecting the update option fixed it for me. After a restart WSL and Docker work again.

Thank you sooooo much! Your reply perfectly solve my problem!

HenryZ5734 avatar Jan 23 '24 03:01 HenryZ5734

I think I had the same issue. Yesterday I updated Docker Desktop from 4.20.1 to 4.21.0. I did not do a restart after the upgrade and everything worked fine. When starting the notebook today the "unexpected WSL error" dialog was shown. When trying to execute WSL (Ubuntu) I received "WslRegisterDistribution failed with error 0x80073cfc".

Downloading the latest WSL release (msixbundle) from https://github.com/microsoft/WSL/releases and selecting the update option fixed it for me. After a restart WSL and Docker work again.

A million thanks!❤️

rogepi avatar Feb 21 '24 02:02 rogepi

I had an error due to an incorrectly configured .wslconfig. Exactly the same mistake as yours. I deleted all the comments and extra lines from the config, and everything worked. Initially, I took it from the Microsoft website, but it didn't work without its settings. As a result, I deleted everything, leaving only these lines in it:

.wslconfig

memory=4GB 
processors=2

And everything started ok.

suprunchuk avatar Apr 25 '24 06:04 suprunchuk

I also encountered the same problem. Perhaps it's my network problem, and trying the above methods and running "wsl -- update" in PS is ineffective The final solution is to find the offline update package for WSL, After installing the latest version of WSL, version 4.28.0 of Docker Desktop was successfully launched. Download address: https://github.com/microsoft/WSL/releases

wmdzkey avatar Apr 29 '24 09:04 wmdzkey

.wslconfig

@suprunchuk how do locate .wslconfig file?

AmosSpark avatar May 26 '24 06:05 AmosSpark

I think I had the same issue. Yesterday I updated Docker Desktop from 4.20.1 to 4.21.0. I did not do a restart after the upgrade and everything worked fine. When starting the notebook today the "unexpected WSL error" dialog was shown. When trying to execute WSL (Ubuntu) I received "WslRegisterDistribution failed with error 0x80073cfc".

Downloading the latest WSL release (msixbundle) from https://github.com/microsoft/WSL/releases and selecting the update option fixed it for me. After a restart WSL and Docker work again.

I installed the file but did not work for me. CPU virtualization is also enabled

AmosSpark avatar May 26 '24 06:05 AmosSpark

.wslconfig

@suprunchuk how do locate .wslconfig file?

  1. Open the explorer. (Win + E)
  2. Enter %UserProfile% in the address bar
  3. Find the file at the bottom .wslconfig or create it.

изображение

suprunchuk avatar May 26 '24 09:05 suprunchuk

2. %UserProfile%

Thank you, I did not see the file so I created one and enter the variable sand values you provided. Still got same error.

AmosSpark avatar May 26 '24 10:05 AmosSpark

I think I had the same issue. Yesterday I updated Docker Desktop from 4.20.1 to 4.21.0. I did not do a restart after the upgrade and everything worked fine. When starting the notebook today the "unexpected WSL error" dialog was shown. When trying to execute WSL (Ubuntu) I received "WslRegisterDistribution failed with error 0x80073cfc". Downloading the latest WSL release (msixbundle) from https://github.com/microsoft/WSL/releases and selecting the update option fixed it for me. After a restart WSL and Docker work again.

Thank you so much, this bypass solved my problem! I haven't been able to fix my docker desktop for 3 long days. You saved me,

Thank you!

This worked for me. Installing newest version of WSL from github releases worked right away without reboot on windows 10. Just reopen Docker Desktop without reinstalling it after installing the newest WSL.

mindwellsolutions avatar Jun 07 '24 06:06 mindwellsolutions