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

Error code: Wsl/Service/E_UNEXPECTED #9490

Closed
1 of 2 tasks
nehe009 opened this issue Jan 17, 2023 · 15 comments
Closed
1 of 2 tasks

Error code: Wsl/Service/E_UNEXPECTED #9490

nehe009 opened this issue Jan 17, 2023 · 15 comments

Comments

@nehe009
Copy link

nehe009 commented Jan 17, 2023

Version

Microsoft Windows [Versión 10.0.19045.2486]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.79.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

steps taken until I got the error, in a fresh OS installation

  • Activate systemd
    sudo nano /etc/wsl.conf
    [boot] systemd=true

wsl.exe –shutdown

  • Install webmin
    sudo nano /etc/apt/sources.list → deb https://download.webmin.com/download/repository sarge contrib
    wget https://download.webmin.com/jcameron-key.asc
    cat jcameron-key.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/jcameron-key.gpg
    sudo apt-get install apt-transport-https
    sudo apt-get update
    sudo apt-get install webmin

  • install webinoly (lemp)
    wget -qO weby qrok.es/wy && sudo bash weby -clean
    sudo stack -php-ver=8.1
    sudo stack -mysql-ver=10.6
    sudo stack -lemp

So far so good, all services work properly.

Expected Behavior

When closing the console window where the linux operating system is open, the WSL is expected to stop all services in the background and turn off the virtual machine.

Actual Behavior

When I start the application again I get the following error:

Fatal Error
Error code: Wsl/Service/E_UNEXPECTED
press any key to continue

and then the window closes.

Diagnostic Logs

No response

@benhillis
Copy link
Member

/logs

@ghost
Copy link

ghost commented Jan 17, 2023

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

@c4artisan
Copy link

c4artisan commented Jan 24, 2023

this just happened to me after shutting down my ubuntu distro and then rebooting (after installing a few packages from the ubuntu-desktop bundle)

please help, that distro has a lot of important stuff on it

@c4artisan
Copy link

it somehow automagically revived itself?
installed the rest of the bundle (when i say bundle i mean the packages listed among "the following NEW packages will be installed" thing). working amazing so far

@vm75
Copy link

vm75 commented Apr 14, 2023

WslLogs-2023-04-14_07-19-36.zip

For me WSL runs great initially. I notice this issue if I come back to work after a big gap. Once I hit the error, wsl --shutdown is useful.

Linux home-pc 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description:    Ubuntu 22.10
Release:        22.10
Codename:       kinetic

I am running the following: snapd, microk8s and I use VSCode plugin for WSL.

@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

1 similar comment
@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

@Morrigan-Ship
Copy link

same error

@Taco0220
Copy link

Taco0220 commented Apr 2, 2024

same error:
Error code: Wsl/Service/E_UNEXPECTED
please.

@marcoaureliocardoso
Copy link

@Taco0220,
If you need to restore the WSL "machine" (to recover files, etc.), see if this approach can help you:
https://stackoverflow.com/a/76354545/1493870

It's not the solution to this issue. Only a way to get back the files inside the WSL.

@Taco0220
Copy link

Taco0220 commented Apr 2, 2024

@Taco0220, If you need to restore the WSL "machine" (to recover files, etc.), see if this approach can help you: https://stackoverflow.com/a/76354545/1493870

It's not the solution to this issue. Only a way to get back the files inside the WSL.

I've tried a lot of things, but nothing worked。

@901238746
Copy link

This just happened to me

@fliespl
Copy link

fliespl commented Sep 6, 2024

Get it frequently lately. Much confusion. I feel like it started once I:

  • updated to latest
  • enabled options="metadata"
  • enabled dbus
# Check if DBus is running, if not, launch it
if ! pgrep -x "dbus-launch" > /dev/null; then
    eval `dbus-launch --sh-syntax`
#    echo "DBus session started."
fi

@noeldamps
Copy link

I had the same error today. wsl.exe --shutdown fixed it on my maschine.

@skhan87
Copy link

skhan87 commented Feb 18, 2025

wsl.exe --shutdown

worked for me

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