rancher-desktop
rancher-desktop copied to clipboard
Failed to translate \\wsl.localhost\Ubuntu\tmp\working-dir
Actual Behavior
An error message occurs when runing nerdctl command:
❯ nerdctl image ls
<3>WSL (4223) ERROR: CreateProcessParseCommon:731: Failed to translate \\wsl.localhost\Ubuntu\tmp\working-dir
REPOSITORY TAG IMAGE ID CREATED PLATFORM SIZE BLOB SIZE
❯ pwd
/tmp/working-dir
Steps to Reproduce
- Fresh Install of Rancher desktop 1.6.0 (not tryed with previsous version) 2. WSL2 Enable 3. Windows Version : 11 Pro Build 21H2 - 22000.1098 4. Ubuntu 22.04.1 LTS
- Enable WSL Integration
- Run nerdctl command
Result
Display the error
<3>WSL (4250) ERROR: CreateProcessParseCommon:731: Failed to translate \\wsl.localhost\Ubuntu\tmp\working-dir
Expected Behavior
No Error
Additional Information
No response
Rancher Desktop Version
1.6.0
Rancher Desktop K8s Version
1.52.2
Which container engine are you using?
containerd (nerdctl)
What operating system are you using?
Windows
Operating System / Build Version
Windows Version : 11 Pro Build 21H2 - 22000.1098
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
None
I cannot repro this with Windows 10 Pro 10.0.19044 Build 19044 using RD 1.6.0.
Could you please try the following things:
- Factory reset Rancher Desktop, start it again, and retry the command.
- Update WSL (
wsl --update
), which worked for people here. - Try running a different version of the Ubuntu WSL distro. I don't actually see 22.04 as an option when I do
wsl --list --online
. Maybe try 20.04? I'm not sure whether WSL requires special images of Linux distros, or whether it can use anything. But I could see it causing a problem.
I see the following issue on wsl-vpnkit: https://github.com/sakai135/wsl-vpnkit/issues/150. The error is very similar. @Nino-K I can't remember what the state of wsl-vpnkit is but I know I've heard the term around. Could this be causing this issue?
Also @jynolen could you please provide the Rancher Desktop logs here? Bonus points for enabling debug mode before generating the logs. Thanks!
I started having this issue as well on Windows 10 after performing an update to the latest WSL2 using wsl.exe --update
from an Ubuntu distribution.
I was running Ubuntu 20.04 LTS and I had the error. I upgraded to 22.04 for a different purpose and I am still having the problem. It doesn't seem to be dependant on the Ubuntu release.
All other WSL functions seem to be working as expected.
Here is the information about my Windows version:
Edition Windows 10 Education
Version 21H2
Installed on 2021-11-09
OS build 19044.2311
Experience Windows Feature Experience Pack 120.2212.4190.0
wsl.exe --version
WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19044.2311
In the wsl-vpnkit#150 link above, they mention trying the following command wsl.exe -d Ubuntu pwd
(adapted for my case with Ubuntu). It returns my /mnt/c/Users/tlamoureux
when run in powershell and /home/tlamoureux
when ran in WSL2.
A few more things I tried which did not resolve the issue with attempting any of the nerdctl
commands:
- Factory reset of Rancher-desktop
- Rebooting the entire Windows system and launching Rancher-desktop again
Which logs should I upload here? None of the logs get updated when I run nerdctl
.
Edit to add WSL version
Edit 2: Error on shell startup in WSL2 : bashonubuntuonwindows has a similar problem with nerdctl
. Unfortunately, there is no response.
Here's an update:
The error message was:
<3>WSL (3341) ERROR: CreateProcessParseCommon:782: Failed to translate \\wsl.localhost\Ubuntu\home\MYUSERNAME
The Rancher-desktop debug logs indicated an error with k3s:
could not load Kubernetes client config from /etc/rancher/k3s/k3s.yaml: stat /etc/rancher/k3s/k3s.yaml: no such file or directory
Since Rancher-desktop was working well prior to doing updating WSL from the Microsoft Store or doing a wsl --update
(I really can't remember which one broke it), I thought that a Factory reset and uninstalling Rancher-desktop followed by deleting all my WSL distro, uninstalling WSL and removing the Windows Subsystem for Linux optional component would help. After a reboot and reinstalling everything, I am still receiving the Failed to translate error whenever I run a rancher-desktop command. However, it appears I am now able to use nerdctl
to build images and list them. This sounds promising.
Unfortunately, I did not backup the previous logs before doing the factory reset. I won't be able to append those anymore. I will update as I find more.
https://github.com/rancher-sandbox/rancher-desktop/issues/3267#issue-1421347743
I have the same problem in Debian of WSL:
<3>WSL (6985) ERROR: CreateProcessParseCommon:782: Failed to translate \\wsl.localhost\Debian\home\jack
But in the Windows command line, everything is normal
same nerdctl problem. error with Ubuntu, working with Windows. win11 22H2 22621.1194 (WSL) Ubuntu 22.04.1 LTS Rancher Desktop 1.7.0 K8s 1.25.6
I'm also running into this error with Rancher Desktop 1.7.0, configured to use containerd
and no Kubernetes, in the following environment:
$ wsl --version
WSL version: 1.1.3.0
Kernel version: 5.15.90.1
WSLg version: 1.0.49
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1265
Most likely the issue comes from nerdctl-stub
, which is what you actually execute inside WSL.
The message doesn't appear if I change directory anywhere under /mnt/c
:
$ (/home/acotten) nerdctl --version
<3>WSL (1737) ERROR: CreateProcessParseCommon:786: Failed to translate \\wsl.localhost\Ubuntu\home\acotten
nerdctl version 1.0.0
$ (/mnt/c) nerdctl --version
nerdctl version 1.0.0
Just to rule out a possible issue with nerdctl
itself (not the stub), I updated the internal Rancher Desktop version from 1.0.0 to 1.2.1 using the following procedure:
-
Get a recent
nerdctl
release binary and save it somewhere on the Windows host. I called mineC:\Users\acotten\nerdctl-1.2.1
in this example. -
In Powershell (Windows), enter the
rancher-desktop
WSL instance:$ rdctl.exe shell
-
From within the
rancher-desktop
WSL instance, copy the release binary from Windows to the Linux PATH:$ cp /mnt/c/Users/acotten/nerdctl-1.2.1 /usr/local/bin/
-
In your main WSL instance, e.g. Ubuntu, set the path to
nerdctl
as seen by therancher-desktop
instance:$ export RD_NERDCTL=/usr/local/bin/nerdctl-1.2.1
-
Try printing the
nerdctl
version again:$ (/home/acotten) nerdctl --version <3>WSL (1664) ERROR: CreateProcessParseCommon:786: Failed to translate \\wsl.localhost\Ubuntu\home\acotten nerdctl version 1.2.1
The stub actually calls wsl.exe
from within Linux, and indeed I can reproduce the issue from within any WSL instance:
$ wsl.exe --distribution rancher-desktop --exec id
<3>WSL (2298) ERROR: CreateProcessParseCommon:786: Failed to translate \\wsl.localhost\Ubuntu\home\acotten
uid=0(root) gid=0 groups=0,14(uucp),101(docker)
I've seen people recommend passing the --cd
flag to wsl.exe
on newer versions of WSL: https://github.com/sakai135/wsl-vpnkit/issues/150
Other interesting discussions:
- https://github.com/microsoft/WSL/issues/8723
- https://github.com/microsoft/WSL/issues/9252
tl;dr WSL can't translate the Ubuntu /home path into a suitable path inside the rancher-desktop
instance, because it doesn't exist there. Just ignore the warning, or uninstall the update from Windows Store if it bothers you (but lose the newer wslg capabilities).
This has been verified on Win10 Pro. Everything is fine if I run the commands from within my /mnt/c directory, but if I leave the /mnt/c directory the error message is displayed even though the commands work. The above comment seems correct and it appears like it may be a WSL issue.
Same as me.