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

[Bug]: When connecting netclient to a second network an interface is not created #1282

Open
1 task done
sahoahfoa opened this issue Jul 2, 2022 · 3 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@sahoahfoa
Copy link

Contact Details

Discord: Scottie#8631

What happened?

When joining my Windows 11 netclient to a second network the wg interface is not created and does not appear in wg show. dlrow_olleh on discord suggested changing the default port setting or enabling UDP punching for the second network . This fixed the issue and the interface was created when pulling the config again (I might have had to leave and rejoin actually). I'm assuming wireguard sees the second network pointing at the same endpoint and port and wont create the second interface. According to dlrow_olleh "netclient should check if the port is in use and use a different one"

Version

v0.14.4

What OS are you using?

Windows

Relevant log output

PS C:\Program Files (x86)\Netclient> netclient pull -vvv -n sahnet
[netclient.exe] 2022-07-01 18:33:25 netclient.exe is in proper location, C:\Program Files (x86)\Netclient\netclient.exe
2022/07/01 18:33:25 Gravitl Netclient on Windows started
[netclient.exe] 2022-07-01 18:33:25 turn on UDP hole punching (dynamic port setting)? no
[netclient.exe] 2022-07-01 18:33:28 waiting for interface...
[netclient.exe] 2022-07-01 18:33:30 interface ready - netclient.. ENGAGE
[netclient.exe] 2022-07-01 18:33:34 pulled network config for sahnet
[netclient.exe] 2022-07-01 18:33:34 register at https://api.netmaker.redacted:443/api/server/register
[netclient.exe] 2022-07-01 18:33:34 certificates/key saved
[netclient.exe] 2022-07-01 18:33:35 running stop of Windows Netclient daemon
[netclient.exe] 2022-07-01 18:33:36 error running command: "C:\Program Files (x86)\Netclient\winsw.exe" "stop"
[netclient.exe] 2022-07-01 18:33:36 '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
 perable program or batch file.
[netclient.exe] 2022-07-01 18:33:36 error with stop of Windows Netclient daemon: exit status 1 : '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
operable program or batch file.

[netclient.exe] 2022-07-01 18:33:36 running start of Windows Netclient daemon
[netclient.exe] 2022-07-01 18:33:36 error running command: "C:\Program Files (x86)\Netclient\winsw.exe" "start"
[netclient.exe] 2022-07-01 18:33:36 '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
 perable program or batch file.
[netclient.exe] 2022-07-01 18:33:36 error with start of Windows Netclient daemon: exit status 1 : '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
operable program or batch file.

[netclient.exe] 2022-07-01 18:33:36 reset network and peer configs

#####################################################################################################

netclient pull -vvv -n nocnet
[netclient.exe] 2022-07-01 18:32:01 netclient.exe is in proper location, C:\Program Files (x86)\Netclient\netclient.exe
2022/07/01 18:32:01 Gravitl Netclient on Windows started
[netclient.exe] 2022-07-01 18:32:01 turn on UDP hole punching (dynamic port setting)? no
[netclient.exe] 2022-07-01 18:32:04 waiting for interface...
file does not exist
[netclient.exe] 2022-07-01 18:32:06 Error pulling network config for network:  nocnet
 could not reliably create interface, please check wg installation and retry
[netclient.exe] 2022-07-01 18:32:06 register at https://api.netmaker.redacted:443/api/server/register
[netclient.exe] 2022-07-01 18:32:06 certificates/key saved
[netclient.exe] 2022-07-01 18:32:07 running stop of Windows Netclient daemon
[netclient.exe] 2022-07-01 18:32:07 error running command: "C:\Program Files (x86)\Netclient\winsw.exe" "stop"
[netclient.exe] 2022-07-01 18:32:07 '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
 perable program or batch file.
[netclient.exe] 2022-07-01 18:32:07 error with stop of Windows Netclient daemon: exit status 1 : '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
operable program or batch file.

[netclient.exe] 2022-07-01 18:32:07 running start of Windows Netclient daemon
[netclient.exe] 2022-07-01 18:32:07 error running command: "C:\Program Files (x86)\Netclient\winsw.exe" "start"
[netclient.exe] 2022-07-01 18:32:07 '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
 perable program or batch file.
[netclient.exe] 2022-07-01 18:32:07 error with start of Windows Netclient daemon: exit status 1 : '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
operable program or batch file.

[netclient.exe] 2022-07-01 18:32:07 reset network and peer configs

#####################################################################################################

PS C:\Program Files (x86)\Netclient> netclient leave -vvv -n nocnet
[netclient.exe] 2022-07-01 18:37:39 netclient.exe is in proper location, C:\Program Files (x86)\Netclient\netclient.exe
2022/07/01 18:37:39 Gravitl Netclient on Windows started
[netclient.exe] 2022-07-01 18:37:39 deleted node QuantumWave  on network  nocnet
[netclient.exe] 2022-07-01 18:37:39 could not flush peer routes when leaving network,  nocnet
[netclient.exe] 2022-07-01 18:37:39 removed WireGuard interface:  nm-nocnet
[netclient.exe] 2022-07-01 18:37:39 removed  nocnetnetwork locally
[netclient.exe] 2022-07-01 18:37:40 running stop of Windows Netclient daemon
[netclient.exe] 2022-07-01 18:37:40 error running command: "C:\Program Files (x86)\Netclient\winsw.exe" "stop"
[netclient.exe] 2022-07-01 18:37:40 '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
 perable program or batch file.
[netclient.exe] 2022-07-01 18:37:40 error with stop of Windows Netclient daemon: exit status 1 : '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command,
operable program or batch file.

[netclient.exe] 2022-07-01 18:37:40 success

#####################################################################################################

PS C:\Program Files (x86)\Netclient> netclient join -vvv -t <token>
[netclient.exe] 2022-07-01 18:38:26 netclient.exe is in proper location, C:\Program Files (x86)\Netclient\netclient.exe
2022/07/01 18:38:26 Gravitl Netclient on Windows started
[netclient.exe] 2022-07-01 18:38:26 joining nocnet at api.netmaker.redacted:443
[netclient.exe] 2022-07-01 18:38:26 node created on remote server...updating configs
[netclient.exe] 2022-07-01 18:38:26 starting wireguard
[netclient.exe] 2022-07-01 18:38:26 turn on UDP hole punching (dynamic port setting)? no
[netclient.exe] 2022-07-01 18:38:28 waiting for interface...
file does not exist
[netclient.exe] 2022-07-01 18:38:46 error installing:  could not reliably create interface, please check wg installation and retry
[netclient.exe] 2022-07-01 18:38:46 removed WireGuard interface:  nm-nocnet

Contributing guidelines

  • Yes, I did.
@sahoahfoa sahoahfoa added the bug Something isn't working label Jul 2, 2022
@MatthewReed303
Copy link

I'm also getting these same errors using the windows netclient. I can establish a connection and it's then goes to warning and then error.

[netclient.exe] 2022-08-03 11:25:40 error with start of Windows Netclient daemon: exit status 1 : '"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command, operable program or batch file.

@RyanWor
Copy link

RyanWor commented Aug 4, 2022

Also having this issue on Windows 11.

"C:\Program Files (x86)\Netclient\winsw.exe"' is not recognized as an internal or external command

Looking in that directory I do not see the winsw.exe file so the error makes sense. Not sure why it's not getting installed when doing the standard PowerShell install of netclient.

@RyanWor
Copy link

RyanWor commented Aug 4, 2022

For what it's worth, I reinstalled netclient but using the msi based installer. (I did not uninstall the existing client first). That method did install winsw.exe as expected and running netclient pull afterwards is now working properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants