Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<3>WSL (8) ERROR: CreateProcessParseCommon:735: Failed to translate \\wsl.localhost\Ubuntu\root #150

Closed
shuohao opened this issue Sep 21, 2022 · 11 comments

Comments

@shuohao
Copy link

shuohao commented Sep 21, 2022

when I typed wsl.exe -d wsl-vpnkit service wsl-vpnkit start
alert <3>WSL (8) ERROR: CreateProcessParseCommon:735: Failed to translate \wsl.localhost\Ubuntu\root

windows 11 22H2
PS D:\Downloads> wsl --version
WSL 版本: 0.66.2.0
内核版本: 5.15.57.1
WSLg 版本: 1.0.42
MSRDC 版本: 1.2.3401
Direct3D 版本: 1.606.4
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows版本: 10.0.22621.521

@F21
Copy link

F21 commented Sep 21, 2022

Seeing the same problem after upgrading to Windows 11 22h2 from Windows 10 21h2.

It also appears that wsl-vpnkit has stopped working after the upgrade and vpns cannot be accessed from wsl2 distros.

@sakai135
Copy link
Owner

Can you try using the following command to start it?

wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start

@sakai135 sakai135 pinned this issue Sep 22, 2022
@F21
Copy link

F21 commented Sep 22, 2022

I have the following in my .zshrc and the error no longer appears, but I am still not able to connect to my vpn in wsl2:

if [[ -z $(wsl.exe -d wsl-vpnkit --cd /app ps | grep wsl-vm) ]]; then
    wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start
fi

I am using Cloudflare warp as my vpn.

Running wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start within my WSL2 Ubuntu distro to manually start it also does not allow the VPN to work in WSL2.

@shuohao
Copy link
Author

shuohao commented Sep 23, 2022

Can you try using the following command to start it?

wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start

great! It works for me.

@F21
Copy link

F21 commented Sep 23, 2022

Upon further investigation, it seems that the service does not start properly.

This is what I get from the logs:

$ wsl.exe -d wsl-vpnkit --cd /app tail -f /var/log/wsl-vpnkit.log
check: ✔️ nslookup success for example.com A using 172.18.96.1
check: ✔️ nslookup success for example.com A using 1.1.1.1
check: ✔️ ping success to IPv4 external host (example.com)
check: ✔️ nslookup success for example.com AAAA using 192.168.67.1
check: ✔️ nslookup success for example.com AAAA using 192.168.67.1
check: ✔️ nslookup success for example.com AAAA using 172.18.96.1
check: ✔️ nslookup success for example.com AAAA using 1.1.1.1
ping: bad address 'example.com'
check: ➖ ping fail to IPv6 external host (example.com)
check: ✔️ wget success for https://example.com

ps also shows that it's not running:

$ wsl.exe -d wsl-vpnkit --cd /app ps
PID   USER     TIME  COMMAND
    1 root      0:00 /init
   14 root      0:00 /init
   15 root      0:00 /init
   16 root      0:00 -ash
   32 root      0:00 /init
   33 root      0:00 /init
   34 root      0:00 ps

However, if I start it in the foreground, it works:

$ wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit
starting wsl-vpnkit
cleaning up iptables...
iptables cleanup done
restoring WSL 2 ip route...
ip: RTNETLINK answers: File exists
restored WSL 2 ip route
wsl-gvproxy.exe exists at /mnt/c/Users/Francis Chuang/wsl-vpnkit/wsl-gvproxy.exe
starting gvproxy at /mnt/c/Users/Francis Chuang/wsl-vpnkit/wsl-gvproxy.exe...
started gvproxy
waiting for dhcp...
INFO[0000] waiting for packets...
udhcpc: started, v1.35.0
time="2022-09-23T14:50:09+10:00" level=info msg="new connection from remote to 17308"
udhcpc: broadcasting discover
udhcpc: broadcasting select for 192.168.67.3, server 192.168.67.1
udhcpc: lease of 192.168.67.3 obtained from 192.168.67.1, lease time 3600
default via 192.168.67.1 dev eth1  metric 207
dhcp completed
removing WSL 2 ip route...
removed WSL 2 ip route
adding rules to iptables...
iptables done
check: ✔️ ping success to IPv4 WSL 2 gateway / Windows host (172.18.96.1)
check: ✔️ ping success to IPv4 Windows host (192.168.67.2)
check: ✔️ ping success to IPv4 gateway (192.168.67.1)
check: ✔️ nslookup success for example.com A using 192.168.67.1
check: ✔️ nslookup success for example.com A using 192.168.67.1
check: ✔️ nslookup success for example.com A using 172.18.96.1
check: ✔️ nslookup success for example.com A using 1.1.1.1
check: ✔️ ping success to IPv4 external host (example.com)
check: ✔️ nslookup success for example.com AAAA using 192.168.67.1
check: ✔️ nslookup success for example.com AAAA using 192.168.67.1
check: ✔️ nslookup success for example.com AAAA using 172.18.96.1
check: ✔️ nslookup success for example.com AAAA using 1.1.1.1
ping: bad address 'example.com'
check: ➖ ping fail to IPv6 external host (example.com)
check: ✔️ wget success for https://example.com

And I can see the process running in another terminal window:

$ wsl.exe -d wsl-vpnkit --cd /app ps
PID   USER     TIME  COMMAND
    1 root      0:00 /init
   14 root      0:00 /init
   15 root      0:00 /init
   16 root      0:00 -ash
   35 root      0:00 /init
   36 root      0:00 /init
   37 root      0:00 {wsl-vpnkit} /bin/sh /usr/sbin/wsl-vpnkit
   77 root      0:00 wsl-vm -path /mnt/c/Users/user/wsl-vpnkit/wsl-gvproxy.exe -iface eth1 -subnet 192.168.67.0/24 -gateway-ip 192.168.67.1 -host-ip 192.168.67.2 -vm-ip 192.168.67.3 -debug=false
   83 root      0:00 {wsl-gvproxy.exe} /init /mnt/c/Users/user/wsl-vpnkit/wsl-gvproxy.exe /mnt/c/Users/user/wsl-vpnkit/wsl-gvproxy.exe -subnet 192.168.67.0/24 -gateway-ip 192.168.67.1 -hos
  142 root      0:00 /init
  143 root      0:00 /init
  144 root      0:00 ps

@F21
Copy link

F21 commented Sep 29, 2022

I built and installed dc94c08 and together with using --cd /app, it seems to have fixed the problem with the service not starting.

@stkofler
Copy link

Can you try using the following command to start it?

wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start

I can also confirm that this command works with the most recent release on Windows 11 22H2.
Thanks for your efforts!!

@josesa-xx
Copy link
Contributor

josesa-xx commented Oct 25, 2022

I managed to get Win 11 using Hyper-V "Quick create" option to setup a "Windows 11 dev environment"

To be able to run WSL inside it I had to enable nested virtualization from my host with command:
Set-VMProcessor -VMName "Windows 11 dev environment" -ExposeVirtualizationExtensions $true

It seems this problem might even be present in Windows 10 as checking with the command:
wsl.exe -d wsl-vpnkit pwd

  • from within wsl I get /root
  • from powershell I get /mnt/c/Users/User

@sakai135
Copy link
Owner

I've just added the --cd /app parameter to the command to run in the readme, since I haven't found another way to get around it.

@robinmalik
Copy link

I have this problem for Debian 11: <3>WSL (141) ERROR: CreateProcessParseCommon:786: Failed to translate \\wsl.localhost\Debian\home\robin

Home directory is set to ~ in Terminal. Starting via the following in .profile:

if [[ -z $(wsl.exe -d wsl-vpnkit ps | grep wsl-vm) ]]; then
    wsl.exe -d wsl-vpnkit service wsl-vpnkit start
fi

I've also tried the addition of --cd /app but this hasn't helped.

@robinmalik
Copy link

Ok, swapped out for:

wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit status >/dev/null || wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit start

Problem solved.

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

No branches or pull requests

6 participants