"WSL integration with 'Ubuntu' unexpectedly stopped." and can't be resolved.
Description
After launching Docker Desktop I get the above error. Restarting WSL integration, or skipping the Ubuntu distro doesn't fix it.
Reproduce
- Open Docker Desktop
- See error, skipping WSL distro or restarting WSL integration doesn't fix it.
Expected behavior
- Docker should open normally
docker version
Client: Version: 27.0.3 API version: 1.46 Go version: go1.21.11 Git commit: 7d4bcd8 Built: Sat Jun 29 00:03:32 2024 OS/Arch: windows/amd64 Context: desktop-linux request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.46/version, check if the server supports the requested API version
docker info
Client: Version: 27.0.3 Context: desktop-linux Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.15.1-desktop.1 Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe compose: Docker Compose (Docker Inc.) Version: v2.28.1-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.32 Path: C:\Program Files\Docker\cli-plugins\docker-debug.exe desktop: Docker Desktop commands (Alpha) (Docker Inc.) Version: v0.0.14 Path: C:\Program Files\Docker\cli-plugins\docker-desktop.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.25 Path: C:\Program Files\Docker\cli-plugins\docker-extension.exe feedback: Provide feedback, right in your terminal! (Docker Inc.) Version: v1.0.5 Path: C:\Program Files\Docker\cli-plugins\docker-feedback.exe init: Creates Docker-related starter files for your project (Docker Inc.) Version: v1.3.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.10.0 Path: C:\Program Files\Docker\cli-plugins\docker-scout.exe
Server: ERROR: request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.46/info, check if the server supports the requested API version errors pretty printing info
Diagnostics ID
EEA95EC9-1894-4FAF-8784-6EA5557E72D5/20240718181649
Additional Info
No response
I experienced the same behavior out of nowhere today. No windows updates or any changes on the system were made. Also tried to downgrade the version but error still remains. Don't know if its related to this issue but it looks like dockerd.exe lost some rights...
time="2024-07-18T21:40:22.081576700+02:00" level=info msg="Starting up"
mkdir C:\ProgramData\docker\exec-root: Access is denied.
maybe related ... https://github.com/microsoft/WSL/issues/11794
Seems like systemd is needed. After enabling systemd in /etc/wsl.conf and restarting wsl dockerd works again.
[boot]
systemd=true
this fixed it on my machine...
It didn't fix it for me, the issue remains.
I am in the same situation. The sudden wsl2 update caused docker-desktop to fail to start and could not connect. I had to turn off the use wsl2 option and continue to use hyper-v
Seems like systemd is needed. After enabling systemd in /etc/wsl.conf and restarting wsl dockerd works again.
[boot] systemd=truethis fixed it on my machine...
This seems to work for me too. First i had to create the wsl.conf under /etc/ in my Ubuntu distro.
似乎需要 systemd。在 /etc/wsl.conf 中启用 systemd 并重新启动 wsl 后,dockerd 可以再次工作。
[boot] systemd=true这修复了我的计算机上的问题...
这对我来说似乎也有效。首先,我必须在我的 Ubuntu 发行版中的 /etc/ 下创建 wsl.conf。
[boot]
systemd=true
did not work completely. I have to manually start the docker-desktop wsl instance before docker-desktop can work with it.
right now i do
wsl -d docker-desktop echo
before starting docker-desktop
[boot] systemd=truedid not work completely. I have to manually start the docker-desktop wsl instance before docker-desktop can work with it. right now i do
wsl -d docker-desktop echobefore starting docker-desktop
I just tried this, and this works.
To clarify, I first added the systemd=true bit, but still got the same error.
Then I did:
wsl -d docker-desktop echo
And then Docker Desktop started in 10 seconds without any issue.
As mentioned in WSL#11794, Reinstalling WSL 2.2.4 from the GitHub releases page fixed it for me with no other modifications. https://github.com/microsoft/WSL/releases
Thank you, this also works! Anyone know how to stop wsl from auto updating to prerelease version?
In my case, I had to remove the current installation, which for me was version 4.32.
I removed all references to the Docker folder in Windows, in AppData and installed version 4.31 and updated again to version 4.32, now everything is back to normal for me.
I found out how to block updates after installing WSL 2.2.4 from the link @joemaller provided. The issue I had was that it updated WSL again and broke Docker again. I had to go into Microsoft Store app, click on my profile, click settings, then turn Off App Updates (this turns off all automatik Microsoft Store updates).
I see this in DD 4.34.1, 7C48A090-B2C4-4034-83FF-67DD8FEBEBF3/20240906004122
WSL 2.2.4.0
I seem to have gotten by this by clicking "Skip Ubuntu WSL Distro", then going to the setting and disabling integration with the default distro, then re-enabling it.