-
Notifications
You must be signed in to change notification settings - Fork 170
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
Network unreachable after upgrading to v0.3.5 #165
Comments
@sakai135 Still having issues after building from ed4f38c
|
@F21 Just to check, does running wsl-vpnkit in the foreground work?
Can you also verify that the
|
@sakai135 Yes, running it in the foreground works for me:
Contents of
|
Can you show what's in the logs when starting the service?
Also if you could provide the WSL version as well.
|
The logs seem to be empty. I am doing this in powershell:
|
Thanks for the info. I just realized that WSL is now at 1.0.0... Unfortunately, updating it didn't let me recreate the issue. Can I ask you to try it with removing the indicated lines from
|
Hmm. It's still not starting for me. The logs appear to be empty as well:
|
Does running the command to start the service from within your Ubuntu distro make any difference? |
Same issue using my Ubuntu distro:
|
Thanks for testing. I'm out of ideas at the moment. I'll look into it again in a few days. Let me know if you figure anything out in the meantime. |
Since running it in the foreground works perfectly, the problem must be in the call to |
I think the problem is not in the status command. I've noticed that the PID file will appear on when running start and then disappear after a minute or so (probably because the binary didn't start properly). The problem is most likely in the start command. |
This is the result of starting it with strace:
The strange thing is that if I start it with strace, it starts and runs properly. If I edit the service file to use
|
Upon further investigation, it seems that the executable can't start in background mode. If I remove these lines, it starts properly: https://github.com/sakai135/wsl-vpnkit/blob/main/distro/scripts/wsl-vpnkit.service#L23-L25 Unfortunately that starts it in the foreground. |
The issue does seem to be on the What I'm mystified by is that v0.3.4 uses nearly the same Can you try maybe replacing |
Same result (still doesn't start properly) if I replace |
Please notice that start-stop-daemon is buggy in the way it doesn't get consistently the pid of the daemon running in background, so the option in start Likewise when doing stop it doesn't quite stop the background processes so I'm killing the ones named v0.3.4 and all previous releases never worked across restarts because of that. However that sill doesn't look sufficient as it doesn't kill them fast enough, while still leaving
On v0.3.5 I can keep doing multiple restarts and the processes are almost cleanly shutdown and started. After a few service restarts eventually it gets started on windows side and starts working again. |
I tried adding
Perhaps the best way would be to do the forking within wsl-vpnkit, rather than relying on |
Add also the block to kill the processes in the stop, those 2 will allow consistent restart Also run with |
Still seeing the same issue though. In my case, it's that wsl-vpnkit doesn't even start properly, it will eventually fail and go back to "not started" status. After adding
|
Can you send the output of Run it a couple of times (3 or 4 in rapid succession) to see if it makes a difference. |
Here's what I got:
|
Also do the same round as before where you start the service and keep checking the status, but this time run the status with additional debug From powershell side see if wsl-gvproxy.exe process is running |
Judging from the logs, I think
I just started it in the foreground again, and there was no broken pipe and it started properly. So I think there's something causing the broken pipe (permissions maybe?) when starting it using start-stop-daemon. |
I've re-written the service init script without |
After a bit of poking around, I noticed that the Sometimes, reading the size results in an EOF. I tried changing https://github.com/sakai135/wsl-vpnkit/blob/main/cmd/vm/main.go#L152 to ignore the EOF by prepending it with:
But that causes issues with the The strange thing is that running in the foreground always works reliably, but using the service causes issues even with #169, which removes the |
Closed per #169 |
I am using wsl-vpnkit on
Windows 11 22H2 Build 22621.819
.Ubuntu is
Ubuntu 22.04.1 LTS 5.15.74.2-microsoft-standard-WSL2
in WSL2.I am receiving
Network is unreachable
errors when sshing into a machine over a private network connected to Cloudflare WARP (via zero trust):Downgrading to v0.3.4 allows me to connect again.
Logs from powershell:
The text was updated successfully, but these errors were encountered: