WSL: WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate

Version

Microsoft Windows [Version 10.0.22000.1335]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.79.1-microsoft-standard-WSL2

Distro Version

Release: 20.04

Other Software

Visual Studio Code (1.74.1)

Repro Steps

  1. PS C:\Users\user> wsl.exe --update
  2. Open ubuntu terminal
  3. Get the following output:
<3>WSL (4564) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin
➜  ~

I’m sorry for the poor reproduction steps, it just happened when I ran wsl.exe --update

Expected Behavior

Should not throw an error.

Actual Behavior

Getting <3>WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin every time I open a terminal

Diagnostic Logs

Let me know about any information I need to supply.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 13
  • Comments: 62

Most upvoted comments

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I’m stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

It’s in my PATH environnement variable defined on Windows. Maybe WSL should just ignore non existant path values ?

I had encountered a similar issue, but in my case, I was getting this error for all windows paths such as C:\Windows\System32.

Simply restarting the terminal did not work for me.

Restarting wsl seemed to fix it for me ( run wsl --shutdown in PowerShell and then reopen your wsl terminal )

First time trying to use wsl I ran into the same issues.

I checked my paths, removed missing folders from my path statements and still the issue existed. I shutdown wsl and tried it again, same thing…

I then installed ubuntu: wsl --install ubuntu set a password (prompted) and I was dropped to the shell prompt… hooray!

I ctrl-d to exit and then typed: wsl Same error…

I then set ubuntu as the default distro: wsl --set-default ubuntu Followed by trying it again: wsl Perfect! I was dropped the shell without any errors relating to path…

I suspect the default distro was causing the issue, errors with path appear to be a diversion.

Hope this helps somebody.

I met the same problem~ The root cause is D: does not exists when you started windows .

How to recur this issue:

  1. stop PC
  2. power off the mobile hard disk ( which is D: in my PC)
  3. restart PC, into windows ( there are some PATH variable in my windows )
  4. power up the mobile hard disk
  5. start WSL, I found the error message

solution: make sure all the PATH are available and then restart wsl.

$ wsl --shutdown $ wsl

In my case, this error was because of older broken distro still hanging around. You can see list of distro:

wsl --list

You can set default distro:

wsl --set-default Ubuntu

This worked for me.

I had what was likely this same issue just now, and the related potential resolutions I found didn’t seem to solve the issue:

  • Locked BitLocker drive - no, it’s failing on C:, rather than another drive
  • Docker Desktop distribution being set as default - no, I don’t have that installed; the only distro I had was Ubuntu
  • Windows paths issue - disabling windows paths does hide some of the errors up top around translating paths, but still shows the C: mount failing, and the underlying C: drive still isn’t mounted
    Failed to mount C:\, see dmesg for more details.
    Failed to mount G:\, see dmesg for more details.
    
    (G:\ is from Google Drive, and is way less important - but seems to be affected by the same issue)

I believe this started after upgrading to Windows 23H2, and happened on both 2.0.8 and 2.0.9. I tried uninstalling WSL entirely (deregistering the distro, removing the distro + WSL items from Windows Programs, removing the optional feature, rebooting, and then re-running wsl --install) but it showed the same issue on a fresh install of Ubuntu, weirdly enough.

I think this is the relevant part of dmesg when the issue presents itself (for C:), which seems to match with several other threads I’ve seen about mounting issues, but doesn’t seem to explain this specific issue:

[    2.995549] /usr/bin/wslpath:
[    2.995555] C:\Users\EdwardJones

[    3.002935] [13:03:50.670] <3>WSLGd: LogException:75:
[    3.002948] Exception: Invalid argument @../main.cpp:117 (TranslateWindowsPath)

[    3.137008] 9pnet_virtio: no channels available for device drvfs
[    3.143810] WSL (2) WARNING: mount: waiting for virtio device drvfs
[    3.246239] 9pnet_virtio: no channels available for device drvfs
[    3.347613] 9pnet_virtio: no channels available for device drvfs
[    3.450334] 9pnet_virtio: no channels available for device drvfs
[    3.552722] 9pnet_virtio: no channels available for device drvfs
[    3.655365] 9pnet_virtio: no channels available for device drvfs
[    3.758037] 9pnet_virtio: no channels available for device drvfs
[    3.860596] 9pnet_virtio: no channels available for device drvfs
[    3.962834] 9pnet_virtio: no channels available for device drvfs
[    4.065597] 9pnet_virtio: no channels available for device drvfs
[    4.167849] 9pnet_virtio: no channels available for device drvfs
[    4.271759] 9pnet_virtio: no channels available for device drvfs
[    4.373593] 9pnet_virtio: no channels available for device drvfs
[    4.475863] 9pnet_virtio: no channels available for device drvfs
[    4.578869] 9pnet_virtio: no channels available for device drvfs
[    4.681303] 9pnet_virtio: no channels available for device drvfs
[    4.784107] 9pnet_virtio: no channels available for device drvfs
[    4.889478] 9pnet_virtio: no channels available for device drvfs
[    4.992848] 9pnet_virtio: no channels available for device drvfs
[    5.095910] 9pnet_virtio: no channels available for device drvfs
[    5.198619] 9pnet_virtio: no channels available for device drvfs
[    5.201325] WSL (2) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000400, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/

Similarly, when trying to manually mount the drive, I get a “No such file or directory” error, even though /mnt/c still exists:

$ sudo mount -t drvfs C: /mnt/c
<4>WSL (588) WARNING: mount: waiting for virtio device drvfs
<3>WSL (588) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000000, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: No such file or directory

Potential mitigation: Another issue suggested trying

[wsl2]
virtio9p=false

in ~/.wslconfig on Windows, then rebooting WSL (wsl --shutdown first) to debug the issue in more detail, which seems to have solved it for me for now, but I don’t know if there are other implications here (I can’t see this flag documented in Advanced settings configuration in WSL). 🤔

cool, just the path environment variable in windows, just delete it in your windows.

~Got the same translation error <3>WSL (53) ERROR: UtilTranslatePathList:2671: Failed to translate E:\SomePath\ when trying to open a folder in WSL using VSCode.~

EDIT: Actually the error was because E: did not exist on that machine.

@qdm12 Problem solved. Restarting the shell seems to do the trick. Thanks!

I have the same issue for a subst drive. I suspect that this might be a way to reproduce the issue; create an entry in

HKLM:SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

to subst any path to a new drive name, reboot the device, and launch the WSL prompt.

I had <3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate F:\DATI\platform-tools I was fixing it set path | findstr platform-tools inside it find a … ;F:\DATI\platform-tools; … so check envinronment variables follow instruction on this link https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html delete the line error or correct it with the correct path in my situation my drive was E:

after correct it i fix that error/warning

  1. The issue arises from the Windows and WSL environment path variables conflicting or the WSL attempting to access unavailable paths.
  2. A solution is to prevent WSL from appending the Windows PATH to the WSL PATH.
  3. To implement this solution, you need to edit the wsl.conf file located in the /etc/ directory in your WSL instance.
  4. Add the following lines to the wsl.conf file:

[interop] appendWindowsPath=false

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I’m stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

It works and here is a simple one-line command for adding that to the end of wsl.conf!

echo -e "[interop]\nappendWindowsPath = false" | sudo tee -a /etc/wsl.conf

Did you close and re-open your shell/terminal? Such that the environment variables get reloaded. Otherwise try a reboot?

This looks to have fixed the problem for me:

[wsl2]
virtio9p=false

In my case, this error was because of older broken distro still hanging around. You can see list of distro:

wsl --list

You can set default distro:

wsl --set-default Ubuntu

This worked for me.

docker-desktop strikes again…

Now after reboot the problem came back. But I managed to fix it by doing the following steps, maybe it will help someone else:

Set up wslconfig with

[wsl2]
virtio9p=false
  1. Reboot windows
  2. Start Windows run (WINDOWS + R)
  3. Type pwsh and hold CTRL+SHIFT to start powershell in admin mode.
  4. Type wsl –shutdown to exit wsl and then type wsl to start it again

Steps 1-4 must be done after every reboot it seems, very annoying. I guess it could be put in a powershell command and place it on the desktop, maybe it could be made to run during startup or something.

Potential mitigation: Another issue suggested trying

[wsl2]
virtio9p=false

in ~/.wslconfig on Windows, then rebooting WSL (wsl --shutdown first) to debug the issue in more detail, which seems to have solved it for me for now, but I don’t know if there are other implications here (I can’t see this flag documented in Advanced settings configuration in WSL). 🤔

This worked for me and my coworkers, thank you! I did have to reboot my laptop for this to take full effect (just wsl --shutdown wasn’t sufficient).

I have used WSL for some time. After a reboot today, I got these errors and I can no longer use my C disk

wsl: A localhost proxy configuration was detected but not mirrored into WSL. WSL in NAT mode does not support localhost proxies.
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot\bin
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\system32
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\Wbem
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
...
<3>WSL (649) ERROR: CreateProcessEntryCommon:493: chdir(/mnt/c/winworkspace) failed 2
-bash: /mnt/c/Windows/System32/wsl.exe: No such file or directory

It seems that my C drive is no longer mounted.

mount -l | grep drvfs Shows nothing. df -h Does not show my C drive

I have tried mounting it with sudo mount -t drvfs C: /mnt/c/ But it fails with:

<4>WSL (715) WARNING: mount: waiting for virtio device drvfs
<3>WSL (715) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000000, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: No such file or directory

How can I solve this? My C drive works just fine in windows as usual.

Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use appendWindowsPath=false then you will lose the ability to call the programs defined in system variable. In my case vscode’s code keyword stopped working. So, I reverted that.

In my case, this error was because of older broken distro still hanging around. You can see list of distro:

wsl --list

You can set default distro:

wsl --set-default Ubuntu

This worked for me.

This is exactly the issue I was facing.

(base) PS Q:\> wsl --list
Distributions du Sous-système Windows pour Linux :
docker-desktop-data (par défaut) <==== culprit
Ubuntu
Ubuntu-22.04

so I added this in my powershell scripts:

wsl --set-default Ubuntu # just in case ... I have a docker-desktop-data by default that messed around ...

seems to work now, but I don’t know how to revert the default, it might have broken something else

If your /etc/wsl.conf was setted with:

[automount]
enabled=false

you will receive these errors:

<3>WSL (318) ERROR: UtilTranslatePathList:2866: Failed to translate C:.…

When I commented lines above in /etc/wsl.conf, all erros was fixed to me.

My environment:

$ cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM

C:\Users\bernardo\ubuntu-home   /home/bernardo  drvfs   defaults,metadata,uid=1002      0       0

$ cat /etc/wsl.conf
[boot]
systemd=true

# [automount]
# enabled=false

[network]
generateResolvConf=false

# [interop]
# appendWindowsPath=false

My %userprofile%\.wslconfig:

[wsl2]
swap=0
# virtio9p=false

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I’m stuck needing to fix the UtilTranslatePathList problem. The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

It works and here is a simple one-line command for adding that to the end of wsl.conf!

echo -e "[interop]\nappendWindowsPath = false" | sudo tee -a /etc/wsl.conf

also need restart wsl

This problem still exists for both me and my colleague in 2.0.14.0

It looks like virtio9p has been disabled by default in the latest release: https://github.com/microsoft/WSL/releases/tag/2.0.11 - I guess that’s related to this! It seems like this issue is being worked on actively, in that case =)

[wsl2] virtio9p=false

I also tried this option but it didnt seem to do much for me.

Windows paths issue - disabling windows paths does hide some of the errors up top around translating paths, but still shows the C: mount failing, and the underlying C: drive still isn’t mounted

Disabling the windows path thingy did reduce the number of errors but I still could not access c.

EDIT:

Now it seems to work again. I think adding the virtio9p=false option solved it!