gawindx / WinNUT-Client

This is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
GNU General Public License v3.0
395 stars 70 forks source link

Client disconnected after waking up from sleep #88

Open ldellus opened 3 years ago

ldellus commented 3 years ago

Hello,

I'm running a Windows NUT Client version 2.1.7740 on a Windows 10 PC, connecting to a NUT server running on Ubuntu. Everything works fine until my PC wakes up from sleep. The NUT Client doesn't reconnect automatically, I have to reconnect it manually.

Is there a way to configure the client so that it reconnects automatically after waking up?

Thanks,

Laurent

johnrando commented 3 years ago

I am also experiencing this issue, running Win10 21H1 and WinNUT 2.1.7740.35837.

polarlightning commented 3 years ago

I think I have related issue, that could be fixed by the same code, as I use anti-virus software, that secures Internet banking sessions by disallowing all other (TCP/IP) socket connections (by default) other than the browser session with the bank. After I've done my banking (takes more time than the 30s retry period of Windows NUT client) and all communications are again enabled, the Windows NUT client does not recover from the situation and manual reconnect is needed. Obviously this is not desirable and the "Failure is a standard mode of operation"-principle should rule i.e. bad connectivity should be tolerated and normal operation should be restored as soon as it is sensibly possible. ( Windows NUT client v.2.0.7722.30975, Windows 10 Pro 64-bit as client, QNAP TS-253Be 8GB as server running the UPS-server-sw and connected to the APC UPS 1500VA)

Hedders commented 2 years ago

I am also seeing this behaviour with version 2.1.7740.35837 running on Windows 10 21H1. I am running it as a net client (my Synology NAS is the master).

It seems like the client just doesn't attempt to reconnect on wake from sleep. Manually reconnecting works fine.

johnehler commented 2 years ago

The same problem occurs if you disable your network adapter and reenable. This requires constantly monitoring the WinNut client.

Hedders commented 2 years ago

Fascinatingly, this doesn't seem to happen in Windows 11. Since upgrading my PC to Windows 11, WinNUT reconnects to the master on my Synology NAS a few seconds after waking from sleep.