One more idea, inspired by messages systemd sometimes gives:

* Select to "Copy" the timestamps of when e.g. your `nut-server.service`
stopped/restarted;
* As root(!) run `journalctl -xl` for a detailed log with service state
changes and reasons, and other details, piped into `less` by default
* Press `G` to scroll to the end (maybe wait a minute for it to react, if
you like me have months of active journal to sift through)
* Search up via `?` for the timestamp you've copied earlier
* Scroll a few screenfulls of text around (mostly before) to get a better
educated guess about why the restart happened (some failure of the NUT
daemon? some dependency change? system restart? sleep/hibernate/throttle?
OOM killer - this one would also be seen in `dmesg`? etc.)

Also check in `dmesg` if there are any USB events around that time (e.g.
UPS getting lost and reconnected)? If it does happen, check polling
frequency settings on one hand and maybe set up monitoring like MRTG to
correlate if the system could have been e.g. too busy at the moment, so
could not dedicate enough time to regular polls and assumed a timeout
(happened to me with a weak embedded device destined to monitor a dozen
UPSes, or so we hoped).

Good luck,
Jim


On Fri, Jan 19, 2024 at 8:35 PM Jim Klimov <jimklimov+...@gmail.com> wrote:

> > 1) How do I make the nut-server and nut-monitor find the right pid
> files? They are there but it seems they can't be opened. Permissions are
> nut/nut.
>
> Actually, if the preceding lifetime of the service was a graceful stop,
> the exiting daemon should have removed its PID files. Then the newly
> starting one would check and not find them - as I wrote before - to make
> sure there is no hung old competitor to kill off as part of the start-up.
> So works as is normal, just with scary messages (newer versions should be
> less cryptic about this).
>
> > Jan 19 16:14:52 mars nut-monitor[3781]: Init SSL without certificate
> database
>
> This means your NUT build is SSL-capable, but you did not configure it
> with certificates so it is using plaintext mode.
>
> > Jan 19 16:14:52 mars nut-monitor[3781]: Login on UPS [Eaton@localhost]
> failed - got [ERR ACCESS-DENIED]
>
> Given that in some messages posted earlier it works, and in some it is
> denied (soon after upsd startup), it is the most puzzling issue here (other
> than the service restarts which you did not post explanations about). I'd
> guess that it retried the connection too early somehow, if upsd is already
> listening but did not yet read all configuration. Not sure this should
> happen. Also might be if you have several MONITOR lines for the same
> device/server and some of them are wrong?
>
> Jim
>
>
> On Fri, Jan 19, 2024 at 6:33 PM Stefan Schumacher via Nut-upsuser <
> nut-upsuser@alioth-lists.debian.net> wrote:
>
>> I still have two questions:
>> 1) How do I make the nut-server and nut-monitor find the right pid
>> files? They are there but it seems they can't be opened. Permissions
>> are nut/nut.
>> 2) What do these error messages mean?
>> Jan 19 16:14:52 mars nut-monitor[3781]: Init SSL without certificate
>> database
>> Jan 19 16:14:52 mars nut-monitor[3781]: Login on UPS [Eaton@localhost]
>> failed - got [ERR ACCESS-DENIED]
>>
>> Yours sincerely
>> Stefan
>>
>> Am Fr., 19. Jan. 2024 um 17:59 Uhr schrieb Matus UHLAR - fantomas
>> <uh...@fantomas.sk>:
>> >
>> > On 19.01.24 17:02, Stefan Schumacher via Nut-upsuser wrote:
>> > >Jan 19 05:50:13 mars nut-monitor[849]: Signal 15: exiting
>> >
>> > >Jan 19 05:50:17 mars nut-server[1303]: Signal 15: exiting
>> >
>> > this looks like someone repeatedly killed nut server. This not a
>> problem of
>> > UPS.
>> > --
>> > Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
>> > Warning: I wish NOT to receive e-mail advertising to this address.
>> > Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
>> > Atheism is a non-prophet organization.
>> >
>> > _______________________________________________
>> > Nut-upsuser mailing list
>> > Nut-upsuser@alioth-lists.debian.net
>> > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>>
>> _______________________________________________
>> Nut-upsuser mailing list
>> Nut-upsuser@alioth-lists.debian.net
>> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>>
>
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to