-
Notifications
You must be signed in to change notification settings - Fork 1.3k
WSL 2.5.4 Breaks Docker Desktop for Windows - Will not start #12748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging |
Same for Docker Desktop 4.39.0 + WSL 2.5.4 pre-release Docker Engine shuts down with error:
The error pops up not every time. Not sure if it's connected to the issue directly. C:\> wsl --version
WSL version: 2.5.4.0
Kernel version: 6.6.75.1-1
WSLg version: 1.0.66
MSRDC version: 1.2.6074
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.3194 # uname -a
Linux docker-desktop 6.6.75.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Sat Feb 8 02:00:20 UTC 2025 x86_64 Linux Downgraded back to 2.5.1 pre-release, it works fine now. UPD: I don't use .wslconfig, there's no such file in my profile. |
I got the same error, and the fix was to add .wslconfig to the user's windows directory with the following parameters:
|
I just updated, have DD 4.39.0 and WSL 2.5.4.0 and I don't have any issue 🤔 Does the problem appear only when opening the session after a cold start or anytime DD tries to starts?
@justknife These are all already the same as the default values, so if you didn't had a |
I just updated, have DD 4.39.0 and WSL 2.5.4.0 and I don't have any issue 🤔 Does the problem appear only when opening the session after a cold start or anytime DD tries to starts? I got the same error, and the fix was to add .wslconfig to the user's windows directory with the following parameters: [boot] @justknife These are all already the same as the default values, so if you didn't had a .wslconfig file, it should not change anything (see https://learn.microsoft.com/fr-fr/windows/wsl/wsl-config#automount-settings) Before these parameters were explicitly declared, Docker crashed with errors similar to those seen by the users above. |
Got same error:
If create .wslconfig and add strings written above, my wsl VM cuss at them :)
I have another one machine with Windows version 10.0.26120.1843, all other versions is same, all working fine How to rollback to previous version? |
I'm experiencing the issue in both scenarios. The issue "Docker Engine stopped" is always present when launching Docker Desktop after having restarted the PC. Then, if I close/re-open Docker, I'd say it's 50/50 on whether the docker engine will start successfully or fail to start. Docker Docker Desktop 4.39.0 Edit: updated the findings |
WSL raise an error in the event viewer about
That's weird... My versions are: I have docker desktop starting when I open my session and my WSL distro is Debian. We seem to share the same versions on pretty much anything but I have no docker error! 🤔 I re-tried today with a cold boot, a reboot, shutting down and restarting docker without shutting down WSL, down and restarting docker after a wsl --shutdown... No error whatsoever... I guess I can only wish you all a good luck 🤣 BTW, last time I had a serious problem with DD and WSL (no Maybe worth giving it a try? (It will delete any volume, container etc., make backups if you don't want to lose any data related to docker!) |
Completely remove Docker and reinstall, no luck. Docker running and immediately stopped, tried Docker Desktop 4.38, instead 4.39 Update: After Docker start I have error "checking distro state for "Ubuntu-24.04": Get "http://ipc/check?distro=Ubuntu-24.04": context deadline exceeded: unexpected error", but Docker Desktop working fine After update to latest Docker Desktop with no issue! |
running engine: waiting for the Docker API: engine linux/wsl failed to run: starting WSL engine: error spotted in wslbootstrap log: "[2025-03-29T21:22:18.642773538Z][wsl-bootstrap][F] context canceled" Reverting again |
I've reverted back to the stable builds (2.4.13.0) by running: wsl --uninstall
wsl --install --no-distribution Docker Desktop now starts just fine. |
@FlattusBlastus: Could you capture /logs of this failure ? That would help us understand what's causing this |
There are a lot of logs on the 2.5.1 thread: #12711 |
I see the following error starting the VM:
Larger log:
|
Thank you @ryanwinter. This might be the root cause. I can't reproduce it though, which version of docker are you using, and do you have anything in your .wslconfig ? |
I just updated to v4.40.0, but had the same issue with v4.39.0. My .wslconfig contains the following at the moment:
Also I restarted a few times and now it managed to boot up when I had an Ubuntu shell open. Here was the same kernel output:
|
So investigating a little more.
|
The solution for this is easy. WSL 2.5.4 does not load tun/tap by default. To fix:
In general this should be fixed by Docker to ensure the modules are loaded. |
Did downgrade help to anyone? i tried
but docker doesn't start in wsl |
Downgrade helped me. I pretty much did
and got everything working again.
|
What is your docker version? |
Docker Desktop v4.40.0
|
This would explain why launching the default distro fixes the issue, because it seems that the tun modules is loaded then. |
Thanks a lot, that's indeed something that we changed in 2.5.4. We'll revert this change in the next pre-release. |
When will the next pre-release be available? Thanks. |
I see that the 2.5.6 pre-release is now available, see here: https://github.com/microsoft/WSL/releases/tag/2.5.6 |
Everything is looking good for me in 2.5.6! |
Windows Version
Windows 11
WSL Version
2.5.4
Are you using WSL 1 or WSL 2?
Kernel Version
6.6 I guess
Distro Version
None
Other Software
No response
Repro Steps
Boot PC. DD fails to launches but the engine does not.
Expected Behavior
Boot PC. DD starts automatically.
Actual Behavior
DD fails to launches but the engine does not.
Diagnostic Logs
Just a heads up - moved back to 2.4.13 asap
The text was updated successfully, but these errors were encountered: