gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.4k stars 547 forks source link

Windows Client Scenario #1114

Closed doodlemania2 closed 3 months ago

doodlemania2 commented 2 years ago

Attempted to use external client but couldn't make that work, so, I joined my laptop like a regular node with Windows. As a mobile device, would be great for it to auto-detect new local IP address more quickly. Took a number of steps repeatedly to force it to recognize the new IP address as I move around networks.

afeiszli commented 2 years ago

Just to confirm, the issue is with getting a new Local IP address, not a new Public IP address?

I'm looking at the code and see an oversight in how we grab the local address on checkin, which is likely causing the issue.

doodlemania2 commented 2 years ago

Well, I've observed both actually @afeiszli - I fixed the local one by updating manually in dashboard, but the public IP address only picks up if I disable/reenable the windows based connection which was strange.

afeiszli commented 2 years ago

hmmm it sounds like maybe the daemon just isn't running locally?

doodlemania2 commented 2 years ago

When I start netmaker in Windows (Win11), it spawns a CMD window, then a GUI window. It doesn't like getting an update from my wifi on updated local or isp address without a number of contortions to the interface directly. Happy to debug with you if you like at some point.

afeiszli commented 2 years ago

Did you install via MSI or just run the exe directly?

doodlemania2 commented 2 years ago

MSI based!

afeiszli commented 2 years ago

Ahhh ok, the CMD window is not meant to be the one receiving the updates. There is a daemon running as a Windows Service that should be getting the updates. That said, there could be other issues blocking the process.

doodlemania2 commented 2 years ago

Ahhh - interesting! Didn't think to check services for something new - any way to debug?

doodlemania2 commented 2 years ago

Found the services and started it (it was marked to start automatically but wasn't running). Once it started, it did in fact pull local updates and was reflected in the GUI a short time later. Mesh came up!

Still getting a warning from the GUI though, despite being connected on the "Last Check In" showing many days ago with a WARNING! message next to it.

Would be amazing if the GUI could show the individual peers connected status.

afeiszli commented 2 years ago

hmmm ok, weird that it stopped...maybe after a restart? We should add a method to auto-update and track status of daemon via GUI, but it would be good to track down what caused the daemon to stop in the first place.

The WARNING in the gui is a bug that we've fixed for 0.14.1.

Other than that, is the client now recieving updates?

doodlemania2 commented 2 years ago

Ah! Perfect, yep - when I start that service, things happen pretty quick. Excited to try 0.14.1 shortly.

afeiszli commented 2 years ago

@doodlemania2 just to confirm, does 0.14.1 fix your issues relating to:

doodlemania2 commented 2 years ago

My apologies - I closed the wrong item - will test this weekend once I can get the server upgraded. One additional note - it does look like the windows service in 0.14.0 stops frequently, so restarting it "kicks" things into gear, but it isn't staying running. Not sure if that's on purpose or addressed in 0.14.1

doodlemania2 commented 2 years ago

Updated all my linux machines like a champ but the windows update did not go smoothly - I uninstalled the 0.14.0 from control panel and then installed 0.14.1 via MSI. It errored indicating the following: 2022-06-01 11:13:04,360 INFO - Installing service 'Netclient (netclient)'... 2022-06-01 11:13:04,367 ERROR - A service with ID 'netclient' already exists. 2022-06-01 11:13:04,370 FATAL - Failed to install the service. The specified service already exists.

[process exited with code 1073 (0x00000431)]

Likely the uninstallation didn't remove the service. I think I'm now stuck.

afeiszli commented 2 years ago

hmmmm, are you able to manually remove the Windows Service?

doodlemania2 commented 2 years ago

Yes, sc delete for the win. However, reinstallation isn't detecting my wireguard installation (it's definitely installed) so am stuck at the moment on that node ... (test node so no urgency of course) happy to debug more just point me in the right direction!

abhishek9686 commented 3 months ago

@doodlemania2 can you try it out with the latest netmaker version? I am closing this issue, feel free to open a new one, if you encounter new issues