[Nut-upsuser] "no longer stale" when disconnected with 2.0.5 newhidups

Arjen de Korte arjen at de-korte.org
Sun Jan 28 09:19:00 CET 2007


> After I disconnect the UPS the upsd write "Data for UPS [apc] is stale -
> check driver" in /var/log/messages. In the same second it tells "UPS [apc]
> data is no longer stale". This repeats all the time the ups is
> disconnected:
>
> Jan 25 14:45:03 degpn026w226 kernel: usb 4-1: USB disconnect, address 3
> Jan 25 14:45:06 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
> check driver
> Jan 25 14:45:08 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
> Jan 25 14:45:10 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
> check driver
> Jan 25 14:45:10 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale

[...]

Now that Peter has pointed me in the right direction, forget my previous
posts.

This is really weird. There are basically two ways for upsd (by means of
the sstate_dead() function) to determine the *driver* is stale (it has
nothing to do with the UPS, we'd better change the wording of the error
messages). Either the driver has not send us anything within MAXAGE
seconds or upsd has problems maintaining the connection to the driver
socket.

Unless you've changed the value of MAXAGE to some ludicrous low value of
two seconds, this might be a socket problem. I recall someone having
similar problems on a *BSD system a while ago. What system are you using?
Could you check if the socket is in /var/state/ups? Whatever happens, the
driver should *not* remove the socket if it can't communicate with the
UPS. It should call dstate_datastale() rather than giving up the socket in
that case (this is not how the line of communication works). So the
problem is probably in the driver, since it has no problems keeping the
socket fresh when the UPS is connected.

Best regards, Arjen
-- 
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57




More information about the Nut-upsuser mailing list