Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Dealing with error: nsenter: failed to parse pid #79

Open
galdalali opened this issue Jun 18, 2022 · 0 comments
Open

Dealing with error: nsenter: failed to parse pid #79

galdalali opened this issue Jun 18, 2022 · 0 comments

Comments

@galdalali
Copy link

galdalali commented Jun 18, 2022

Weirdest thing ever,

Sometimes, I get this error when trying to run WSL:

nsenter: failed to parse pid: '48
49'

It is defiantly something related to that package (systemd) since it never happened before I install it.
Now the way to solve it is to open PowerShell and run wsl --shutdown and then it loads OK.

The weird part is that I'm trying to run it from a bat script and shutdown the WSL every time I run the script using

powershell -Command "& {wsl --shutdown}"
timeout /t 5

or this:

:wsl_stop
for /F "tokens=3 delims=: " %%H in ('sc query "Lxssmanager" ^| findstr "        STATE"') do (
  if /I "%%H" NEQ "STOPPED"  (
   wsl --terminate %DISTRIBUTION%
   timeout /t 1
   sc stop "Lxssmanager"
   goto wsl_stop
  )
)

But the wsl still wont come up, only when I run then wsl --shutdown command manually on PowerShell.

Any thoughts or a way around it?

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

No branches or pull requests

1 participant