Giter VIP home page Giter VIP logo

Comments (17)

terlar avatar terlar commented on August 24, 2024 5

I also experience this same issue. I didn't test all of the versions, but 2.0.0 works. Thanks for checking, I will probably pin to 2.0.4 then for now.

I don't get the same error though.

I get this:

wsl-vpnkit[43207]: /nix/store/kvzzfa5ly1qyw080bhndgr97nf4c4xps-gvproxy-0.7.1/bin/gvproxy-windows.exe is not executable due to WSL interop settings or Windows permissions

But running the script directly from my user with sudo works.

So something with the permissions is different when it runs via systemd since 2.0.5.

from wsl-vpnkit.

dabeck81 avatar dabeck81 commented on August 24, 2024 2

I have created a pull-request to resolve my issue as explained in #247. Please have a look at the pull-request : #250
This does the necessary to set the WSL_INTEROP value correct inline in the wsl-vpnkit script.
No need anymore for having an extra script running before the service is started.

And most of all, it is self-healing, so if you have more than one bash-terminals running and you would close the process linked to the WSL-INTEROP-socket, that will be detected and will switch over to another running socket

from wsl-vpnkit.

asalaria-cisco avatar asalaria-cisco commented on August 24, 2024 2

Just wanted to report that since I have added the following to my .wslconfig file, all my network issues (with and without connecting to VPN) have been solved. I have removed wsl-vpnkit since it was not needed anymore.

[wsl2]
networkingMode=mirrored

from wsl-vpnkit.

blakeduffey avatar blakeduffey commented on August 24, 2024 1

Seems that WSL versions >= 2.0.0 don't work correctly with this script anymore (systemctl mode).

I feel the change was in 2.0.5
2.0.0-2.0.4 all work with wsl-vpnkit, per my testing

from wsl-vpnkit.

r1m avatar r1m commented on August 24, 2024 1

Fixed it using #247 (comment)

from wsl-vpnkit.

asalaria-cisco avatar asalaria-cisco commented on August 24, 2024 1

is this feature only available on Windows 11?

Yes. This requires Windows 11 version 22H2 or higher (reference).

from wsl-vpnkit.

pahar0 avatar pahar0 commented on August 24, 2024

Seems that WSL versions >= 2.0.0 don't work correctly with this script anymore (systemctl mode).

Some changes have been introduced in the 2.0.0 WSL version related to connectivity and networking, this could be the reason.

Could you try to play with the new experimental-settings introduced and see if any combination / setting fix the systemctl issue?

from wsl-vpnkit.

pahar0 avatar pahar0 commented on August 24, 2024

from wsl-vpnkit.

asalaria-cisco avatar asalaria-cisco commented on August 24, 2024

@dabeck81 the PR doesn't work for me: I tried the following:

I copied the two new files from your PR (wsl-vpnkit and wsl-vpnkit.service) to overwrite those in wsl-vpnkit 0.4.1 already installed on my computer. I then repeated the steps to create the systemd service and verified that the new wsl-vpnkit.service is in place.
I did a wsl --shutdown. I get the following error message:

Here is what I get in journalctl:

$ journalctl -b -u wsl-vpnkit.service
Nov 22 18:08:37 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + TAP_NAME=wsltap
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + CHECK_HOST=example.com
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + DEBUG=0
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + WSL_INTEROP=/run/WSL/7_interop
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + '[' 0 -eq 0 ]
Nov 22 18:08:39 XXXXXX wsl.exe[201]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[201]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 1.
Nov 22 18:08:39 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:39 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + TAP_NAME=wsltap
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + CHECK_HOST=example.com
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + DEBUG=0
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + WSL_INTEROP=/run/WSL/27_interop
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + '[' 0 -eq 0 ]
Nov 22 18:08:39 XXXXXX wsl.exe[450]: + set +x
Nov 22 18:08:39 XXXXXX wsl.exe[450]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:39 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 2.
Nov 22 18:08:40 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:40 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + TAP_NAME=wsltap
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + CHECK_HOST=example.com
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + DEBUG=0
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + set +x
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + WSL_INTEROP=/run/WSL/46_interop
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + '[' 0 -eq 0 ]
Nov 22 18:08:40 XXXXXX wsl.exe[451]: + set +x
Nov 22 18:08:40 XXXXXX wsl.exe[451]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:40 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 3.
Nov 22 18:08:40 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:40 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + TAP_NAME=wsltap
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + CHECK_HOST=example.com
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + DEBUG=0
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + set +x
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + WSL_INTEROP=/run/WSL/65_interop
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + '[' 0 -eq 0 ]
Nov 22 18:08:40 XXXXXX wsl.exe[452]: + set +x
Nov 22 18:08:41 XXXXXX wsl.exe[452]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 4.
Nov 22 18:08:41 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:41 XXXXXX systemd[1]: Started wsl-vpnkit.
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VPNKIT_GATEWAY_IP=192.168.127.1
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VPNKIT_HOST_IP=192.168.127.254
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VPNKIT_LOCAL_IP=192.168.127.2
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + VMEXEC_PATH=/app/wsl-vm
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + TAP_NAME=wsltap
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + CHECK_HOST=example.com
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + CHECK_DNS=1.1.1.1
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + DEBUG=0
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + set +x
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + WSL2_TAP_NAME=eth0
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + WSL2_GATEWAY_IP=172.28.0.1
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + WSL_INTEROP=/run/WSL/84_interop
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + '[' 0 -eq 0 ]
Nov 22 18:08:41 XXXXXX wsl.exe[455]: + set +x
Nov 22 18:08:41 XXXXXX wsl.exe[455]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 5.
Nov 22 18:08:41 XXXXXX systemd[1]: Stopped wsl-vpnkit.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Start request repeated too quickly.
Nov 22 18:08:41 XXXXXX systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Nov 22 18:08:41 XXXXXX systemd[1]: Failed to start wsl-vpnkit.

from wsl-vpnkit.

OrpheeGT avatar OrpheeGT commented on August 24, 2024

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

add inside "/etc/wsl.conf" :

[interop]
enable = true

from wsl-vpnkit.

blakeduffey avatar blakeduffey commented on August 24, 2024

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

add inside "/etc/wsl.conf" :

[interop]
enable = true

I'm still seeing this error on 2.0.14

As an aside - per the release notes 'Disable the 'NoRemoteImages' process mitigation policy since it breaks execution of windows executables' was supposed to resolve the recent issue with wsl-vpnkit - but I'm still having breaking issues.

from wsl-vpnkit.

blakeduffey avatar blakeduffey commented on August 24, 2024

I'm wondering if my issue is related to a third variable. When I removed it, wsl 2.0.14 and wsl-vpnkit .0.4.1 immediately started working.

from wsl-vpnkit.

xgalaxy avatar xgalaxy commented on August 24, 2024

The interop enable trick shouldn't be needed since its by default true.

from wsl-vpnkit.

OrpheeGT avatar OrpheeGT commented on August 24, 2024

Maybe... My issue since I applied the patch is, as I installed the wsl-vpn-kit in my systemd ubuntu WSL, each time I open a new tab (with Hyper.is) the new tab seems to relaunch the service and breaks any current other tab connected with SSH...

I maybe will have to switch to a dedicated vpn-kit distrib...

from wsl-vpnkit.

blakeduffey avatar blakeduffey commented on August 24, 2024

Just wanted to report that since I have added the following to my .wslconfig file, all my network issues (with and without connecting to VPN) have been solved. I have removed wsl-vpnkit since it was not needed anymore.

[wsl2]
networkingMode=mirrored

is this feature only available on Windows 11?

from wsl-vpnkit.

ikesler avatar ikesler commented on August 24, 2024

is this feature only available on Windows 11?

Yes. This requires Windows 11 version 22H2 or higher (reference).

Which is still available only in some of Windows Insider channels :(

from wsl-vpnkit.

olucafont6 avatar olucafont6 commented on August 24, 2024

Having a similar issue - this is my WSL and Windows version:

wsl.exe --version
WSL version: 2.0.9.0
Windows version: 10.0.22631.3007

I tried the networkingMode=mirrored thing but it didn't work, even though I think I should be on a high enough Windows 11 version.

This is the output I get from journalctl -b -u wsl-vpnkit.service:

Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: Started wsl-vpnkit.
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VPNKIT_GATEWAY_IP=192.168.127.1
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VPNKIT_HOST_IP=192.168.127.254
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VPNKIT_LOCAL_IP=192.168.127.2
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + VMEXEC_PATH=/app/wsl-vm
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + GVPROXY_PATH=/app/wsl-gvproxy.exe
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + TAP_NAME=wsltap
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + CHECK_HOST=example.com
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + CHECK_DNS=1.1.1.1
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + DEBUG=0
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + set +x
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: cat: can't open '/etc/resolv.conf': No such file or directory
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + WSL2_TAP_NAME=eth0
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + WSL2_GATEWAY_IP=
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + '[' 0 -eq 0 ]
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: + set +x
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: resolv.conf has been modified without setting generateResolvConf
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: cat: can't open '/etc/resolv.conf': No such file or directory
Feb 05 11:53:38 FDSPCBXrd3EDrax wsl.exe[650]: /app/wsl-gvproxy.exe is not executable due to WSL interop settings or Windows permissions
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: wsl-vpnkit.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: wsl-vpnkit.service: Failed with result 'exit-code'.
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: wsl-vpnkit.service: Scheduled restart job, restart counter is at 5.
Feb 05 11:53:38 FDSPCBXrd3EDrax systemd[1]: Stopped wsl-vpnkit.

Interestingly when I look for this file, it seems to redirect / be linked to another file:

ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 20 Feb  5 11:53 /etc/resolv.conf -> /mnt/wsl/resolv.conf

But then that file doesn't exist ๐Ÿ˜‘:

ls -al /mnt/wsl/resolv.conf
ls: cannot access '/mnt/wsl/resolv.conf': No such file or directory

from wsl-vpnkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.