Skip to content
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

Docker Desktop tries to update wsl each startup #13868

Closed
anton-filatov opened this issue Jan 9, 2024 · 34 comments
Closed

Docker Desktop tries to update wsl each startup #13868

anton-filatov opened this issue Jan 9, 2024 · 34 comments

Comments

@anton-filatov
Copy link

Description

Docker Desktop fails to determine wsl version if windows system locale differs from en. This leads to attempt to upgrade wsl which triggers UAC elevation prompt for "Docker Desktop Privileged Helper" for program location ["C:\Program Files\Docker\Docker\resources\com.docker.admin.exe" wsl-update].

After startup Docker works fine, but UAC elevation prompt is annoying.

Looks like the problem is similar to #13518, #13524. Also #13806 may have the same reason.

Reproduce

  1. Switch to ru locale (Start > Settings > Time & Language > Region > Regional format).
  2. Check wsl version, should be:
wsl --version
Версия WSL: 2.0.14.0
Версия ядра: 5.15.133.1-1
Версия WSLg: 1.0.59
Версия MSRDC: 1.2.4677
Версия Direct3D: 1.611.1-81528511
Версия DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Версия Windows: 10.0.19045.3693
  1. Start Docker Desktop.

Expected behavior

There is no attempt to update wsl.

docker version

Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:08:44 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.26.1 (131620)
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:02 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.25
  GitCommit:        d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.0-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3-desktop.2
    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.21
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  0.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.10
    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: Docker Scout (Docker Inc.)
    Version:  v1.2.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.133.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.47GiB
 Name: docker-desktop
 ID: 801d2d94-f34c-4415-9369-5760c9cc712f
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

Additional Info

Logs when locale is en:

  • com.docker.backend.exe.log
[2024-01-09T16:01:06.989259800Z][com.docker.backend.exe.wsl][I] WSL Updater: version is 2.0.14.0. an update is not required

Logs when locale differs from en:

  • com.docker.backend.exe.log
[2024-01-09T16:00:11.563871200Z][com.docker.backend.exe.wsl][I] WSL Updater: assuming wsl.exe --version not supported. checking wsl.exe --status
[2024-01-09T16:00:11.687214800Z][com.docker.backend.exe.wsl][I] WSL Updater: could not get kernel version from wsl.exe --status. assuming an update is required
[2024-01-09T16:00:11.699008100Z][com.docker.backend.exe.wsl][I] WSL Upater: install mode is set to: installLatestWsl
[2024-01-09T16:00:11.699551700Z][com.docker.backend.exe.wsl][I] WSL Updater: waiting for elevated update to complete
[2024-01-09T16:00:15.590939300Z][com.docker.backend.exe.wsl][I] WSL Updater: elevated update completed
[2024-01-09T16:00:15.884871800Z][com.docker.backend.exe.wsl][I] WSL Updater: assuming wsl.exe --version not supported. checking wsl.exe --status
[2024-01-09T16:00:16.178812500Z][com.docker.backend.exe.wsl][I] WSL Updater: could not get kernel version from wsl.exe --status. assuming an update is required
[2024-01-09T16:00:16.178812500Z][com.docker.backend.exe.wsl][I] WSL Updater: waiting for non-elevated update to complete
[2024-01-09T16:00:16.178812500Z][com.docker.backend.exe.wsl][I] WSL Updater: updating wsl with -> wsl.exe --update --web-download
[2024-01-09T16:00:16.504354700Z][com.docker.backend.exe.wsl][I] WSL Updater: update completed successfully: ��@�>�2�5�@�O�5�B�A�O�  =�0�;�8�G�8�5�  >�1�=�>�2�;�5�=�8�9�. 
 
 ��>�A�;�5�4�=�O�O�  2�5�@�A�8�O�  ?�>�4�A�8�A�B�5�<�0�  W i n d o w s   4�;�O�  L i n u x   C�6�5�  C�A�B�0�=�>�2�;�5�=�0�. 
 
 
[2024-01-09T16:00:16.504354700Z][com.docker.backend.exe.wsl][I] WSL Updater: non-elevated update completed
  • com.docker.admin.exe.log
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
[2024-01-09T16:00:14.136132400Z][com.docker.admin.exe.wsl][I] WSL Updater: updating wsl with -> wsl.exe --update --web-download
[2024-01-09T16:00:15.576283600Z][com.docker.admin.exe.wsl][I] WSL Updater: update completed successfully: ��@�>�2�5�@�O�5�B�A�O�  =�0�;�8�G�8�5�  >�1�=�>�2�;�5�=�8�9�. 
 
 ��>�A�;�5�4�=�O�O�  2�5�@�A�8�O�  ?�>�4�A�8�A�B�5�<�0�  W i n d o w s   4�;�O�  L i n u x   C�6�5�  C�A�B�0�=�>�2�;�5�=�0�. 
@ctalledo
Copy link

Hi @anton-filatov,

Sorry you hit an issue, but thanks for reporting it.

If possible, could you upload the Docker Desktop diagnostics bundle? That will provide us with even more info so we can debug.

Thanks!

@lone-cat
Copy link

@anton-filatov you are the best ) nothing else helped to solve that problem so docker desktop became useless (win 11 with latest updates). Now i at least have a workaround - change locale and work. Thank you!
And UP. For Docker desktop team: Problem is actual. We need normal solution for all locales. Docker desktop worked just fine in previous versions with any locale. But now it does not. It's a breaking change.

@chelnak
Copy link

chelnak commented Jan 23, 2024

Hello,

I wanted to post a quick update to say thank you for your patience and that after some investigation, we identified an issue.

The fix will be included in the upcoming 4.27 release.

Thanks!
Craig 🙂

@lone-cat
Copy link

Great news up here. Look forward to update to 4.27 ) Thanks!!!

@lone-cat
Copy link

Confirm - everything works now in 4.27. Thanks!

@chelnak
Copy link

chelnak commented Jan 28, 2024

Great news! Thank you 🙏

@bsousaa
Copy link
Contributor

bsousaa commented Jan 29, 2024

I'm closing the issue for now and will re-open in case this happens again. Thanks @chelnak

@bsousaa bsousaa closed this as completed Jan 29, 2024
@TheSilvermind
Copy link

@bsousaa I also had this issue before and now I have this issue again on version 4.28.0

@chelnak
Copy link

chelnak commented Mar 1, 2024

@TheSilvermind Would you be able to open a new ticket and provide some diagnostic logs please? 🙏

@bsousaa bsousaa reopened this Mar 7, 2024
@nfyrjd1
Copy link

nfyrjd1 commented Mar 19, 2024

version 4.24.2 doesn't check version of wsl
https://docs.docker.com/desktop/release-notes/#4242

@mockinbirdy
Copy link

Same thing. Had to uninstall 28 version. Sickening.

@thedatabaseme
Copy link

Since updating to 4.33.0 yesterday, I have the same issue. On automatic startup while system startup. First access control of Windows shows up and asks for permission to update system components. When declining it, I see a docker error message, that WSL update failed.

@chelnak
Copy link

chelnak commented Jul 26, 2024

Hey @thedatabaseme - if possible, can you generate a diagnostic bundle and post the ID here?

If the UI is blocked by this issue you can generate one from the command line.

Check out this document for more information https://docs.docker.com/desktop/troubleshoot/overview/

@thedatabaseme
Copy link

@chelnak . Here's the ID F20B0889-70CA-4835-A9B4-7EA20D0B9529/20240726182547. Not sure if this is really helpful though. Since the error on WSL update is reasonable when declining permissions. Since the issue is, that Docker is running a WSL update at every autostart.

Maybe another interesting thing for you. The WSL update seems only to happen during system start / autostart. When I quit Docker Desktop and start again, no permission request shows up.

@datapedd
Copy link

datapedd commented Jul 27, 2024

Also have this issue now with Docker Desktop Privileged Helper asking boot now for permission

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.22631.3880

@baumheld
Copy link

baumheld commented Jul 28, 2024

Having the same issue since 4.33.0

grafik

@litetex
Copy link

litetex commented Jul 28, 2024

Same problem here with 4.33 (my Docker Desktop is configured to start a minute after boot)

I've take a look into the logs and so far found out the following:

  1. (unrelated) UtilTranslatePathList:2866 spams a lot with Failed to translate ..., this makes the logs not very readable...
  2. The WSL Update check is done two times:
    The first one is successful:
    [2024-07-28T11:38:45.913414400Z][com.docker.backend.exe.sys] Checking if a WSL update is required
    [2024-07-28T11:38:45.944888600Z][com.docker.backend.exe.update] version is 2.2.4.0. an update is not required
    [2024-07-28T11:38:45.971183100Z][com.docker.backend.exe.sys] Ensure WslUpdateRequired setting: WslUpdateRequired = false
    
    The second one fails completely:
    [2024-07-28T11:38:50.935181300Z][com.docker.backend.exe.sys] Checking if a WSL update is required
    [2024-07-28T11:38:51.110576800Z][com.docker.backend.exe.update] assuming wsl.exe --version not supported. checking wsl.exe --status
    [2024-07-28T11:38:51.236060100Z][com.docker.backend.exe.update] could not get kernel version from wsl.exe --status. assuming an update is required
    [2024-07-28T11:38:51.307857300Z][com.docker.backend.exe.sys] Ensure WslUpdateRequired setting: WslUpdateRequired = true
    [2024-07-28T11:38:53.926060100Z][com.docker.backend.exe.update] install mode is set to: installLatestWsl
    [2024-07-28T11:38:53.926596200Z][com.docker.backend.exe.update] waiting for elevated update to complete
    

It would be great if we could manually set "wslInstallMode" to something else - which blocks WSL updates - instead of "installLatestWsl" so that we could work around this bug for now.
Is it anywhere documented what options can be set for "wslInstallMode"?

@teejay-87
Copy link

Same problem here with 4.33

@teejay-87
Copy link

I appears fixed after upgrade to 4.33.1 (maybe related to #14222? that's the only fix mentioned in release notes)

@Mickachouw
Copy link

Mickachouw commented Aug 1, 2024

Same problem here, with upgrade from 4.32 to 4.33.1 today,

wsl --version
WSL version: 2.2.4.0
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Windows version: 10.0.19045.4717

Edit : launched wsl --update --pre-release in pwsh, have WSL version: 2.3.14.0 right now, coming from 2.2.4
Have new Kernel version for WSL,
Docker Desktop works fine now, but all images are lost ☹ . So good so far ...

wsl --version
WSL version: 2.3.14.0
Kernel version: 6.6.36.3-1
WSLg version: 1.0.64
MSRDC version: 1.2.5326
Windows version: 10.0.19045.4717

@thedatabaseme
Copy link

thedatabaseme commented Aug 1, 2024

I appears fixed after upgrade to 4.33.1 (maybe related to #14222? that's the only fix mentioned in release notes)

For me, the issue was gone for one restart but reoccured on the second and all thereafter on v 4.33.1

@JohnnyDoesStuff
Copy link

Same issue in our case with v 4.33.1. Docker keeps trying to update wsl after a reboot. It is possible that it does not ask for permissions, but as stated by @thedatabaseme this is always only the case for a single reboot. After that reboot Docker again attempts to perform an update.

In our case Docker tries that within a VM (long story) that does not have any internet access and therefor cannot update anything. In case of that VM, granting the permission does not seem to do anything. My Host PC runs fine and does not ask for these permissions, though which is weird.

I've tried to tell Docker not to do any updates, but all attempts in modifying the settings.json failed so far:

  • Set disableUpdate to true
  • Set showInstallScreen to false
  • Set wslUpdateRequired to false (this will be set to true again by Docker)
  • Set wslInstallMode to an empty string or something like "none"

@vaibhavc2
Copy link

Same issue in the latest update.... I am fed up !! Since last week, after every reboot (or startup), Docker asks for privileges to update wsl. What is this bug!

@andrea-reale
Copy link

andrea-reale commented Aug 6, 2024

Hey all, I have shared a development build that should avoid this loop of "WSL Update required" prompts here. Feel free to try that out and report any feedback!

(Please, also note that custom WSL2 kernels are not officially supported in Docker Desktop - some of the diagnostics shared in this and other threads point to that as a common source of the problem)

@theBNT
Copy link

theBNT commented Aug 6, 2024

@andrea-reale while i cant try this custom build id like to say thanks for addressing this issue, hope it is solved with an official build soon.

regarding the custom WSL2 kernels: when working with e.g. cilium it is (was?) required to enable additional modules within the kernel (see e.g. https://wsl.dev/wslcilium/), can you point into a direction of where the problems arise for docker desktop? would be a pity if its an either-or-situation.

@andrea-reale
Copy link

Hey @theBNT thanks for sharing your feedback.

It is impossible for us to support officially custom kernels, as Docker Desktop as many dependencies on kernel features and the matrix of combination is impossible to maintain.

That said, with development build I shared above (and future Docker Desktop releases), your custom kernel will most likely continue to unofficially work, if it did in the past.

For full openness, the source of the issue in 4.33.1 comes from the added support to the upcoming WSL2 versions (2.3.11 and above), which will ship a thin kernel with loadable modules support. Docker Desktop needs to load some of these modules at boot. Unfortunately, module loading is disabled and fails hard on WSL2 custom kernels, hence the error you were experiencing. The development build tolarates failing to modprobe kernel modules, this way you can continue using your custom kernel as long as it has the required features built-in.

@Shaphil
Copy link

Shaphil commented Aug 15, 2024

I still have the same issue,

Screenshot 2024-07-29 124957

my UAC settings were always like this,

Screenshot 2024-08-15 135447

and with this setting, I didn't have this problem before.

It suddenly appeared, probably after a Windows update, and is still there.

Has there been any progress on this?

@andrea-reale
Copy link

Hi @Shaphil , have you tried the build I shared above in this thread?
If you still have problems, please upload your diagnostics and share your ID and we'll try to help!

@Shaphil
Copy link

Shaphil commented Aug 20, 2024

Hi @Shaphil , have you tried the build I shared above in this thread? If you still have problems, please upload your diagnostics and share your ID and we'll try to help!

Yes, I just did, but it failed like this #13806 (comment)

So I reverted to v4.32 like you suggested (#13806 (comment)) and now everything's ok. I will be waiting for Docker Desktop 4.34.

@pawelel
Copy link

pawelel commented Aug 22, 2024

Hi, just set C:\Program Files\Docker\Docker\resources\com.docker.admin.exe to 'Run as admin'. The UAC prompt no longer appears. Worked only with logout, not reboot ;/

@TheMasterPrawn
Copy link

I cant believe this has been around since Jan 9th and there have been numerous promises that it has been fixed in version x.xxx.xxx. I have an environment where I have software that requires interaction to allow elevation. I am evaluating docker to provide packaged environments to dev and support teams for product and api work. This has been a blocker for me for weeks now. Software should not be trying to update a windows component on startup. If there is a problem, or it needs a version to function it should tell you and then its up to the individual/I.T team to fix.

@christiandavilakoobin
Copy link

Software should not be trying to update a windows component on startup. If there is a problem, or it needs a version to function it should tell you and then its up to the individual/I.T team to fix.

Totally agree. It's not only WSL, but any windows component. There are more apps which may depend on that version, and docker can potentially destroy that.

@lorenrh
Copy link
Member

lorenrh commented Aug 30, 2024

4.34.0 has been released with a fix for this issue, more information o the release notes.

I'll be closing this issue, but if the problem persists please open a fresh issue!

@minhtan143
Copy link

I had an problem in version 4.33.1, fixed when upgrading to 4.34.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests