> I had a brief power fluctuation earlier, which caused the UPS to power up
> a few seconds. Then suddenly NUT was busy shutting down my server, after
> full power had already been restored.
This is not a bug.
> Here's the logs:
>
> Jun 6 13:28:30 hell upsmon[607]: UPS apc620 at localhost on battery
> Jun 6 13:28:35 hell apcsmart[602]: Communications with UPS lost - check
> cabling
> Jun 6 13:28:35 hell upsd[604]: Data for UPS [apc620] is stale - check
> driver
> Jun 6 13:28:35 hell upsmon[607]: Poll UPS [apc620 at localhost] failed -
> Data stale
> Jun 6 13:28:35 hell upsmon[607]: Communications with UPS
> apc620 at localhost lost
> Jun 6 13:28:40 hell upsmon[607]: Poll UPS [apc620 at localhost] failed -
> Data stale
> Jun 6 13:28:45 hell upsmon[607]: Poll UPS [apc620 at localhost] failed -
> Data stale
> Jun 6 13:28:50 hell upsmon[607]: Poll UPS [apc620 at localhost] failed -
> Data stale
> Jun 6 13:28:50 hell upsmon[607]: Executing automatic power-fail shutdown
> Jun 6 13:28:50 hell upsmon[607]: Auto logout and shutdown proceeding
>
> So it appears upsd lost communication with the UPS, but the real problem
> was that after the 15 sec MAXAGE period, upsmon decided it was necessary
> to shutdown.
>
> Why? Any ideas?
This has nothing to do with MAXAGE. See the following exerpt from
'upsmon.conf' which describes what happened:
# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
#
# upsmon requires a UPS to provide status information every few seconds
# (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status
# fetch fails, the UPS is marked stale. If it stays stale for more than
# DEADTIME seconds, the UPS is marked dead.
#
# A dead UPS that was last known to be on battery is assumed to have gone
# to a low battery condition. This may force a shutdown if it is providing
# a critical amount of power to your system.
#
# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT.
# Otherwise you'll have "dead" UPSes simply because upsmon
isn't polling
# them quickly enough. Rule of thumb: take the larger of the two
# POLLFREQ values, and multiply by 3.
Your UPS was on battery when the communication failed and 'upsmon' went
into the fail safe mode by assuming the battery was low. The real problem
here is, why was the communication lost?
Best regards, Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57