docker / for-win

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

Docker Desktop - WSL update failed #14022

Open Da-Bayer opened 4 months ago

Da-Bayer commented 4 months ago

Description

wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Downloading: Windows Subsystem for Linux

The requested operation requires elevation.

: exit status 0xffffffff

Reproduce

  1. Run update docker desktop to version 4.29.0
  2. Finish setting up Docker Desktop - Use recommended setting (requires adminostrator password) -> Finish

Expected behavior

Docker desktop start correctly.

docker version

Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.0.0
 API version:       1.45
 Go version:        go1.21.8
 Git commit:        2ae903e
 Built:             Wed Mar 20 15:18:56 2024
 OS/Arch:           windows/amd64
 Context:           default

docker info

Client:
 Version:    26.0.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.13.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.26.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.27
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.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.23
    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.1.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.6.3
    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%2Fdocker_engine/v1.45/info, check if the server supports the requested API version
errors pretty printing info

Diagnostics ID

38B1FB20-5B09-490A-A484-255D42B5973B/20240417053402

guelzow commented 4 months ago

Hi everyone.

Another diagnostics ID 092845CE-A5A5-46DB-9940-D74EC4092151/20240419053944

Workaround: Start Docker with administrator rights.

More Info: The update to 4.29 deleted all images. I do not login with an administrator account.

Tobi

thien7156329 commented 4 months ago

https://github.com/microsoft/WSL/issues/9157 I run success with issue WSL update failed . Let's install KB5020030 file https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020030

minhruhr commented 4 months ago

Same issue here. version 4.29.0 always tries to update my wsl although it's already on the latest version when I try to do it manually.

wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Downloading: Windows Subsystem for Linux The requested operation requires elevation. : exit status 0xffffffff

uninstalling and reinstalling 4.28.0 works again. But I can't seem to be able to update to 4.29.0

Disgnostic ID:

E440D448-382B-4F34-BEE3-C1D2FB5E0345/20240419121414

jonaskohl commented 4 months ago

Also happens on my end: 640FC6CF-9D49-480B-84CC-C8CF71D41B41/20240422071529

Villad-dev commented 4 months ago

I had the same problem solution below: SOLVED: Reinstall Docker ver. 4.28.0 with preinstalled Ubuntu from Microsoft Store image

bl0000 commented 4 months ago

Can confirm downgrading to 4.28 has fixed the issue for me too.

tjk19 commented 4 months ago

Same issue as well Windows 10 error wsl update failed: update failed: updating wsl: exit code: 4294967295: Discovered even though I had to install Docker Desktop 4.29.0 (145265) with admin rights and Docker Desktop was prompting to update wsl with admin privilidges. The solution was simple. Run wsl.exe --update from a cmd prompt that was not elevated.
Things that make you go Hmmmm

duckodei commented 4 months ago

@minhruhr @Villad-dev @bl0000 where i can get 4.28.0 installer to download, can you give me the link or attach your file installer Thank you a lots <3

bl0000 commented 4 months ago

@duckodei https://docs.docker.com/desktop/release-notes/

Scroll down to 4.28.0.0, click Windows.

sbanoeon commented 4 months ago

Same problem for me. Even though WSL is already updated to latest version. Diagnostic ID: A8FBCE60-CB47-4FBE-811B-CA75083CA43B/20240423084432

Prashant20nov2003 commented 4 months ago

Getting same error please fix this

ShamaGlob commented 4 months ago

have this issue, can't fix it even with 4.28 ver. any ideas?

duckodei commented 4 months ago

@bl0000 I tried, but that show check sum, not any installer file to download. Do I make any mistake here, or can we have a way to use check sum to adjust the version when running the installer? image image

sbanoeon commented 4 months ago

@duckodei did you click on checksum or on Windows? When you click on Windows, it directly downloads the installer.

duckodei commented 4 months ago

@sbanoeon oh thanks a lot, i clicked checksum, my mistake. Let me try to install again

Prashant20nov2003 commented 4 months ago

@sbanoeon oh thanks a lot, i clicked checksum, my mistake. Let me try to install again Just click on the windows option buddy it will start downloading we have to use this version until they fix this issue

duckodei commented 4 months ago

I tried installing version 4.28 & 4.27.2 also but there seems to be a problem, have you encountered it? @sbanoeon @Prashant20nov2003 image

chelpingstinetrill commented 4 months ago

Seeing the same issue here. Windows 10 machines, non-admin accounts. Downgrades to 4.28 allow the engine to start again.

Also, running wsl.exe --update --web-download from an unelevated command prompt Then if open, closing out and opening up Docker for Windows worked, even though wsl reported that it was already at the latest version.

Similar to what tjk19 suggested https://github.com/docker/for-win/issues/14022#issuecomment-2070866709

Diagnostic ID: 33CED035-C391-46A4-8B96-9D06B5AD557C

chelnak commented 4 months ago

Hey everyone 👋 ,

I'm taking a look at this issue.

From the diagnostics provided, the common theme is that the non-elevated check errors out with:

Windows Subsystem for Linux
The requested operation requires elevation.: exit status 0xffffffff

This feels odd, given that in all cases I see that the elevated update completes right before.

I also noticed that none of the diagnostics contained a log for com.docker.admin.exe, which is where we may see clues about what is happening with the elevated update.

Could I ask you to check your logs directory, and let me know if it's present?

It would be here:

C:\Users\<user>\AppData\Local\Docker\log\host\

@chelpingstinetrill I will take a look at your diagnostic right now.

chelpingstinetrill commented 4 months ago

@chelnak that is not present on my regular user account but is present on my admin account.

chelnak commented 4 months ago

@chelpingstinetrill Great! I can see it included in your diagnostics bundle which is really helpful. I can see that WSL gets updated successfully inside the elevated process.

I have a few questions for you if that is OK.

Appreciate your time, thank you!

minhruhr commented 4 months ago

@chelnak WSL is correctly updated in my log file -------------------------------------------------------------------------------->8 -------------------------------------------------------------------------------->8 [2024-04-24T07:05:26.035077800Z][com.docker.admin.exe.update][I] WSL Updater: updating wsl with -> wsl.exe --update --web-download [2024-04-24T07:05:36.538551100Z][com.docker.admin.exe.update][I] WSL Updater: update completed successfully: Checking for updates. The most recent version of Windows Subsystem for Linux is already installed.

If I may answer to your questions, in my case

chelpingstinetrill commented 4 months ago

@chelnak

Did you install Docker Desktop while logged in as an administrator account? It is installed/updated via Intune it uses the SYSTEM acount.

Did you run Docker Desktop while logged in as an administrator? Initial run/fail was with non-admin account. I then tried with admin account for troubleshooting and it ran successfully.

Did you then log in with your non-administrator account? Please see above.

Does your non-administrator account have any local admin / UAC rights? No local admin/UAC for non-admin account.

chelnak commented 4 months ago

@minhruhr @chelpingstinetrill thank you both for the responses. They will be really useful for building a repro of the issue.

Rishikesh-atal commented 4 months ago

I see this message..as shown below:

Docker Desktop - WSL update failed

wsl update failed: update failed: updating wsl: exit code: 1: running WSL command wsl.exe C:\Windows\System32\wsl.exe --update --web-download: : exit status 1

Diagnostics ID is E4DDC3FC-415C-4FF4-9BE1-5DC1E320ADEA/20240425112407

Please help what to do

chelnak commented 4 months ago

Hey @Rishikesh-atal

Can you take a look at the questions I posted here and provide some answers if possible please?

Also, as indicated in the above replies, a possible work around for this is to run wsl --update --web-download from the same user that you are seeing Docker Desktop fail to start.

Also to add, I appreciate that this may not be feasible for those experiencing this on a larger scale!

Thanks, Craig

Rishikesh-atal commented 4 months ago

@chelnak

Please find my reply below to your questions:

  1. Yes
  2. Yes
  3. Have just one user. So was logged in the same administrator account
  4. Since ony one user is there. So this question is not applicable
cloudgreen commented 4 months ago

Thank you so much for this thread!

This is a pretty serious issue as Docker Desktop v4.29 is completely unusable here on Windows 10 22H2 and I lost hours troubleshooting.

v4.28 started perfectly! 😀👍

MatiasHiltunen commented 4 months ago

Getting also this error with 4.29 even with admin account: " wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Copyright (c) Microsoft Corporation. All rights reserved. Usage: wsl.exe [Argument] [Options...] [CommandLine] ... " Apparently there is no such option argument with the wsl --update as "--web-download"

MatiasHiltunen commented 4 months ago
wsl --status
Default Distribution: Ubuntu-22.04
Default Version: 2

Windows Subsystem for Linux was last updated on 30.12.2023
WSL automatic updates are on.

Kernel version: 5.10.102.1

Apparently wsl from microsoft marketplace is unable to update to newer Kernel version:

wsl --update
Checking for updates...
No updates are available.
Kernel version: 5.10.102.1

Latest version available shoud be 5.15.57.1 https://learn.microsoft.com/en-us/windows/wsl/kernel-release-notes

Trying to update that, could be issue that has something to do with Windows version perhaps.

MatiasHiltunen commented 4 months ago
wsl --status
Default Distribution: Ubuntu-22.04
Default Version: 2

Windows Subsystem for Linux was last updated on 30.12.2023
WSL automatic updates are on.

Kernel version: 5.10.102.1

Apparently wsl from microsoft marketplace is unable to update to newer Kernel version:

wsl --update
Checking for updates...
No updates are available.
Kernel version: 5.10.102.1

Latest version available shoud be 5.15.57.1 https://learn.microsoft.com/en-us/windows/wsl/kernel-release-notes

Trying to update that, could be issue that has something to do with Windows version perhaps.

Updating the WSL to use latest version from https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package had no effect to the kernel version. The documentation does not provide information about the kernel version that update is suppose to install so I'm now unsure if the kernel was updated correctly to actual latest version

MatiasHiltunen commented 4 months ago
wsl --status
Default Distribution: Ubuntu-22.04
Default Version: 2

Windows Subsystem for Linux was last updated on 30.12.2023
WSL automatic updates are on.

Kernel version: 5.10.102.1 Apparently wsl from microsoft marketplace is unable to update to newer Kernel version:

wsl --update
Checking for updates...
No updates are available.
Kernel version: 5.10.102.1

Latest version available shoud be 5.15.57.1 https://learn.microsoft.com/en-us/windows/wsl/kernel-release-notes Trying to update that, could be issue that has something to do with Windows version perhaps.

Updating the WSL to use latest version from https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package had no effect to the kernel version. The documentation does not provide information about the kernel version that update is suppose to install so I'm now unsure if the kernel was updated correctly to actual latest version

Windows version should not be an issue

PS C:\WINDOWS\system32> systeminfo | Select-String "^OS Name" , "^OS Version"

OS Name:                   Microsoft Windows 10 Education
OS Version:                10.0.19045 N/A Build 19045
chelpingstinetrill commented 4 months ago

@MatiasHiltunen

Getting also this error with 4.29 even with admin account: " wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Copyright (c) Microsoft Corporation. All rights reserved. Usage: wsl.exe [Argument] [Options...] [CommandLine] ... " Apparently there is no such option argument with the wsl --update as "--web-download"

Try copy/paste the command. You are missing the .exe in your reply. You need to do this with the non-admin account. That worked for me. Good luck!

wsl.exe --update --web-download

chelnak commented 4 months ago

Hey everyone,

We found the root cause of the issue some of you are experiencing.

It's been patched and will be released with Docker Desktop v4.30.

Thanks again for providing diags and answers!

chelpingstinetrill commented 4 months ago

Great work @chelnak!

Just curious, do you have an ETA for the next version?

chelnak commented 4 months ago

I believe the next update is scheduled for the end of the month. 😄

andrewssobral commented 4 months ago

Hello everyone,

I downgraded to 4.28 but I am still getting the same weird issue:

Screenshot 2024-04-27 234245

Additional info:

Microsoft Windows [versão 10.0.20185.1000]
(c) 2020 Microsoft Corporation. Todos os direitos reservados.

C:\Users\andre>wsl --update
Verificando atualizações...
Não há atualizações disponíveis.
Versão do kernel: 5.10.102.1

C:\Users\andre>

any news on that?

ustb-star commented 4 months ago

also happens; E7B5509D-AC4E-4D6A-A081-0B3F2EB1DE45/20240428072427

chris-ss commented 4 months ago

I downgraded the version and still got the error F194B62D-0A50-46F1-86C1-28FF2C97FC32/20240429021728

wmdzkey commented 4 months ago

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

duckodei commented 4 months ago

@wmdzkey Did u met any trouble when installing wsl? With me, it's just so like below, after that, nothing happen. I checked version and installed or not by wsl --list --verbose but it don't recognize. image image image

wmdzkey commented 4 months ago

@duckodei It's different from the output on my end Check if WSL is set to the default version: 2 Snipaste_2024-04-30_13-18-29

duckodei commented 4 months ago

@wmdzkey After setting WSL, did u do some steps else to integrate with docker? Can you list the steps of your setting from start till to be worked. If possible give me more details. Thanks a lot, I'm just stuck with installing docker and getting started with it ; ( image

OmarLtf commented 4 months ago

I downgraded the docker-desktop to version 4.28 but still didn't solve the problem : image

Just solved the issue with : Login with the Admin session Run "wsl --updat" in the cmd ( didn't work in my local session even running the cmd as administrator ) Restart computer and open docker-desktop as an administrator

duckodei commented 4 months ago

@OmarLtf sorry but can you express "Login with the Admin session" in more specific for me. My laptop only has an account ant it's admin account also, i logged in with this account and installing docker, but i dont know that what u mean or not. image image image

wmdzkey commented 4 months ago

@duckodei There are a total of the following steps. The first step is to start the hyper v and container services If it is not installed, check Add in the control panel, programs and features, and Windows features. Step 2: Update WSL Install the latest wsl2 and set the default version to 2 Step 3: Run Docker Desktop 4.28 All of the above

henriec commented 4 months ago

This cost me a whole day.... until i stumbled upon this comment !!!! Thanks !!!!

Same issue here. version 4.29.0 always tries to update my wsl although it's already on the latest version when I try to do it manually.

wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Downloading: Windows Subsystem for Linux The requested operation requires elevation. : exit status 0xffffffff

uninstalling and reinstalling 4.28.0 works again. But I can't seem to be able to update to 4.29.0

Disgnostic ID:

E440D448-382B-4F34-BEE3-C1D2FB5E0345/20240419121414

edingart commented 4 months ago

I have the same problem and but I assume it's because I'm using a WSL version where wsl --version does not exists (none win store version). In the docker logs I find: [2024-05-02T11:45:26.992490300Z][com.docker.backend.exe.eci][W] getting WSL version: executing wsl --version: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --version: Invalid command line option: version

omidrah commented 4 months ago

I had same problem. download wsl from github and install. every thing ok

agray commented 4 months ago

Same issue here.

My diagnostic ID: ED1F22E8-3BAE-4A3C-BF9D-8442B06B5D42/20240505082418

My WSL version info:

WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3527