[Nut-upsuser] Synology NAS is shutting down Ubuntu servers after very brief power outage
Manuel Wolfshant
wolfy at nobugconsulting.ro
Sun Aug 2 17:12:22 BST 2020
On 8/1/20 11:25 PM, Todd Benivegna wrote:
> I'm hoping that someone can shed some light on this… I have a Synology
> NAS (DS416) that has a feature where you can enable a “Network UPS
> Server” which is a NUT server. I have been trying to get the Synology
> to shut down three Ubuntu 20.04 servers that I have. While it does
> work when I test it out manually, sometimes when I am away and the
> power goes out briefly, the servers shut down when the power has been
> out for like five seconds (or less sometimes). When I come home and
> turn on the servers, they boot up but then immediately shut down
> again. This happens until I restart the Synology; then they will boot
> up and stay up. I‘d like them to stay up a little longer than
> that. Ideally, I’d like them to stay up until battery is low, then
> shut down, then all come back on when power is restored.
>
> This is what I have done so far: I have enabled "Enable Network UPS
> server" on the Synology and have installed NUT on each of my servers
> running Ubuntu 20.04. I have added the appropriate IPs to the
> Permitted DiskStation Devices” list. I have also tried setting it on
> the Synology to shut down when battery is low and after a specified
> amount of time (20 minutes). Either way, the servers will shut down
> after like 5 seconds or less. I have edited upsmon.conf and added my
> MONITOR line and setup systemctl so that the nut-client service starts
> automatically at boot. I have no made any other changes to the file;
> the rest is still set to defaults.
>
> So I'm not sure where exactly the problem is; if it's the Synology or
> NUT on Ubuntu. Strange thing is, when I manually test by shutting off
> the power briefly (or for a few seconds, or a few minutes - I've tried
> everything;) every time I do a test, everything works perfect and they
> will shut down when they are supposed to. Seems to only happen when
> there is a passing storm that knocks the power out for a few seconds.
>
> Also, this is what I found in the syslog on one of the machines:
> Jul 31 18:33:29 plex upsmon[970]: UPS ups at 192.168.1.70 on battery
> Jul 31 18:33:34 plex upsmon[970]: UPS ups at 192.168.1.70 on line power
> Jul 31 18:34:04 plex upsmon[970]: Executing automatic power-fail shutdown
> Jul 31 18:34:04 plex upsmon[970]: Auto logout and shutdown proceeding
> Jul 31 18:34:09 plex systemd[1]: nut-monitor.service: Succeeded.
>
> If I’m not mistaken, it is shutting down after power came back on line….?
My first suspect is the Synology version of nut. More specifically, I
suspect that nut triggers a shutdown immediately after the switch to "on
battery" state and only cancels it after a restart.
What I would do is to use wireshark to sniff the communication between
the Synology and one of the Ubuntu machines and log what exactly ( and
when ) is sent by the nut server to the clients. I'd also couple that
with a bit of logging on the nut side
<https://networkupstools.org/docs/man/upslog.html> as well ( for 60 secs
or so, starting shortly before the switch to on-battery, with a very
short interval between polls )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200802/5cc7bd5e/attachment.html>
More information about the Nut-upsuser
mailing list