Torizon WSL 2 doesn't start anymore

I’ve just started my Torizon WSL installed on my windows 11 PC after a couple of weeks.

It doens’t start enymore with the following error:

Welcome to the Torizon WSL 2 v1.0.0
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
subprocess.CalledProcessError: Command ‘[’/usr/sbin/service’, ‘docker’, ‘status’]’ returned non-zero exit status 3.
Bye!

Last time I started it (a couple of weeks ago) it worked.

How can I fix?

Hi @vix,

try this: Open cmd-shell, type “wsl sudo service docker start”. Then open VSCode.

Hope this helps.

Hi @Lars.ceta

only to be 100% sure, what do you mean with cmd-shell?

A terminal on my windows 11 machine?

…the command prompt (cmd.exe)

Thanks!

It started, and in the log I see

Welcome to the Torizon WSL 2 v1.0.0
/home/username/.local/pipx/venvs/xonsh/lib/python3.11/site-packages/torizon_templates_utils/errors.py:58: DeprecationWarning: The last attribute is deprecated and will be removed. Use lastcmd.
return xonsh.last.returncode # type: ignore
Docker service OK
Success

Is this expected?

Or is it a bug that toradex should take care of?

I think Toradex is aware of this issue. I hope this will be fixed in the next release.
Glad the workaround work for you.

Just to inform both of you, I brought that deprecation warning to the attention of our team. We will address this when possible.

Best Regards,
Jeremias

Thanks.

Only one additional info: the command wsl sudo service docker start is necessary after every new boot of Windows 11 host PC.

Only one additional info: the command wsl sudo service docker start is necessary after every new boot of Windows 11 host PC.

This was a known issue, but it has been fixed. It’s likely you may have downloaded and installed the WSL 2 Torizon distro before the fix was applied.

There is a fix you can do for this as posted here: Torizon IDE Extension "Could not activate" - #33 by matheus.tx

Please let us know if this resolves the issue for you.

Best Regards,
Jeremias

It seems that the fix works.

I had to reinstall WS"L 2 Torizon distro some weeks ago. It can be that it was before the fix

Glad to hear the fix worked.