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

Wsl/ERROR_SERVICE_DOES_NOT_EXIST #11882

Closed
1 of 2 tasks
arundelo opened this issue Aug 5, 2024 · 15 comments
Closed
1 of 2 tasks

Wsl/ERROR_SERVICE_DOES_NOT_EXIST #11882

arundelo opened this issue Aug 5, 2024 · 15 comments

Comments

@arundelo
Copy link

arundelo commented Aug 5, 2024

Windows Version

Microsoft Windows [Version 10.0.19045.4651]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

  1. Run a cmd prompt as administrator.
  2. wsl --status

Expected Behavior

A display of the status of Windows Subsystem for Linux.

Actual Behavior

Sixty seconds pass, then this error is printed:

The specified service does not exist as an installed service.
Error code: Wsl/ERROR_SERVICE_DOES_NOT_EXIST

This also happens if I run it in a regular (non-administrator) cmd prompt and it happens with most wsl commands, for example:

wsl
wsl -l -v

It does not happen with wsl --help (which prints a help message right away).

Diagnostic Logs

I ran the collect-wsl-logs.ps1 script in an admin PowerShell and ran wsl --status (in an admin cmd window) while collect-wsl-logs.ps1 was running. It said:

Get-WindowsOptionalFeature : Access is denied.
At C:\Users\AaronBrown.MACALLISTER\collect-wsl-logs.ps1:56 char:1
+ Get-WindowsOptionalFeature -Online > $folder/optional-components.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand

Log collection failed to start (exit code: -2147024891), trying to reset it.
Couldn't start log collection (exitCode: -2147024891)
Log collection is running. Please reproduce the problem and once done press any key to save the logs.
Saving logs...
Logs saved in: C:\Users\AaronBrown.MACALLISTER\WslLogs-2024-08-05_16-35-22.zip. Please attach that file to the GitHub issue.

Here is that file:

WslLogs-2024-08-05_16-35-22.zip

Copy link

github-actions bot commented Aug 5, 2024

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Detected appx version: 2.2.4.0
Error while parsing the logs. See action page for details

1 similar comment
Copy link

github-actions bot commented Aug 7, 2024

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Detected appx version: 2.2.4.0
Error while parsing the logs. See action page for details

@markmungaidrezz
Copy link

WslLogs-2024-08-05_16-35-22.zip does anyone know how to fix this issue

@markmungaidrezz
Copy link

The specified service does not exist as an installed service.
Error code: Wsl/ERROR_SERVICE_DOES_NOT_EXIST
i have the same issue can anyone help me

@arundelo
Copy link
Author

arundelo commented Aug 7, 2024

I've looked at the similar issues. In particular, I've tried:

No success.

The error message says that the service does not exist. As far as I know, the important service is "LxssManager". I have ensured that LxssManager is running (and has a startup type of "Automatic") in the Services control panel. Is there some other service I should check?

It's possible my computer has a weird permissions setup that is causing trouble. (For example, as shown above, when I ran collect-wsl-logs.ps1 it said, "Get-WindowsOptionalFeature : Access is denied" even though I opened the PowerShell window with "Run as administrator".)

@markmungaidrezz
Copy link

how can i solve my issue
please

@arundelo
Copy link
Author

arundelo commented Aug 7, 2024

Inspired by this Super User dot com answer, I tried removing my C:\Windows\System32\Tasks\Microsoft\Windows\Windows Subsystem For Linux directory and reinstalling WSL.

It did not work. But for what it's worth here are the details:

I renamed

C:\Windows\System32\Tasks\Microsoft\Windows\Windows Subsystem For Linux

to

C:\Windows\System32\Tasks\Microsoft\Windows\Windows Subsystem For Linux.bak

(This folder was empty anyway.)

I went to the Windows features control panel, unchecked "Windows Subsystem for Linux", and rebooted.

I ran wsl --status in an admin command prompt. It said:

This application requires the Windows Subsystem for Linux Optional Component.
Install it by running: wsl.exe --install --no-distribution
The system may need to be restarted so the changes can take effect.
Error code: Wsl/WSL_E_WSL_OPTIONAL_COMPONENT_REQUIRED

I ran

wsl.exe --install --no-distribution

It said:

The requested operation requires elevation.
Installing Windows optional component: Microsoft-Windows-Subsystem-Linux

Deployment Image Servicing and Management tool
Version: 10.0.19041.3636

Image Version: 10.0.19045.4651

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
The requested operation is successful. Changes will not be effective until the system is rebooted.
The requested operation is successful. Changes will not be effective until the system is rebooted.

I rebooted then ran wsl --status. It did the same as before (60 seconds then "Wsl/ERROR_SERVICE_DOES_NOT_EXIST").

I looked in the Services control panel and found that LxssManager was not running and its startup type was set to "Manual". I started it and ran wsl --status again but still got the same result.


Another weird permissions thing—when I tried to set LxssManager's startup type to "Automatic" I got "Access is denied", even when running the Services control panel as administrator. I was, however, able to change it by

  1. running RegEdit as administrator

  2. going to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\LxssManager

  3. and changing "Start" from "3" to "2".


For the record, this reinstall did not recreate the C:\Windows\System32\Tasks\Microsoft\Windows\Windows Subsystem For Linux directory.

@OneBlue
Copy link
Collaborator

OneBlue commented Aug 8, 2024

@arundelo: It looks like your installation is corrupted. Does manually installing the latest package solve the issue ?

@arundelo
Copy link
Author

Thanks @OneBlue. Today I did the following:

  1. Went to the Windows features control panel, unchecked "Windows Subsystem for Linux", verified that the "Hyper-V" stuff was unchecked, and rebooted.
  2. Downloaded and ran wsl.2.3.14.0.x64.msi.

It gave me a "Confirm Execution" dialog box which I said "Yes" to. Then the installer ran but it stopped with the error: "The older version of Windows Subsystem for Linux cannot be removed. Contact your technical support group."

This is a work computer so I'm going to ask my company's helpdesk for help but I would like to keep this issue open for a little longer in case they have trouble solving the problem.

@OneBlue
Copy link
Collaborator

OneBlue commented Aug 13, 2024

Thank you @arundelo. Let's collect MSI logs to see what's causing this. Can you run:

msiexec /i <msi> /L*V C:\wsllogs.txt

As administrator, and share the resulting C:\wsllogs.txt once complete ?

@arundelo
Copy link
Author

@OneBlue, here it is:

wsllogs.txt

@OneBlue
Copy link
Collaborator

OneBlue commented Aug 13, 2024

Thank you @arundelo. This is the root cause of the error you're seeing:

DEBUG: Error 2219:  Database: . Invalid Installer database format
1: 2219 2:  3:  4:  
This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
C:\WINDOWS\Installer\4f934.msi

It looks like the currently installed package is corrupted and can't be removed.

One thing you can try is this: https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d to help remove the old package

@arundelo
Copy link
Author

@OneBlue, for what it's worth, C:\WINDOWS\Installer\4f934.msi is a binary file of about 135 megabytes. The timestamp is from a day a couple months ago when I installed Docker, got a bluescreen during the install, ran wsl --install (which gave me "Error: 0x80070424 The specified service does not exist as an installed service"), and uninstalled and reinstalled Docker.

I'll try the troubleshooter at the link you gave, thanks.

@arundelo
Copy link
Author

@OneBlue, I believe the troubleshooter worked! I told it I was trying to uninstall WSL, it said it fixed the problem, then I was able to reinstall WSL.

A co-worker of mine pushed some security policy changes to my computer about the same time so it's also possible that had to do with it.

Now when I run wsl --status I immediately get "Default Version: 2". Thanks.

@centur
Copy link

centur commented Nov 14, 2024

Very similar problem after the recent Windows security updates
Latest installer gives:
Image

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

No branches or pull requests

4 participants