Error code: Wsl/Service/E_UNEXPECTED
Version
Microsoft Windows [Versión 10.0.19045.2486]
WSL Version
- [X] 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
/logs
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!
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
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
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.
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!
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!
same error
same error: Error code: Wsl/Service/E_UNEXPECTED please.
@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, 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。
This just happened to me
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
I had the same error today. wsl.exe --shutdown fixed it on my maschine.
wsl.exe --shutdown
worked for me
the same error, and wsl.exe --shutdown work
if the shutdown doesnt work backup the important files of "home" and reinstall the wsl distro if you have dot files like for zsh,neovim,etc i made a bash script that helps you to backup and restore them easily
wsl --shutdown works at first, but every time when i reopen it, it crash again...
wsl --shutdownworks at first, but every time when i reopen it, it crash again...
How do you start your wsl?
crazy this error is 2 years old: https://github.com/microsoft/WSL/issues/9490#issuecomment-1508653832
i bet it's something to do with sleep mode or battery saving