Skip to content

upsmon: no notification for login error #3403

@g-v-egidy

Description

@g-v-egidy

I have a netclient ( MODE=netclient ) and configured upsmon.conf with the correct ups and servername, but a wrong username or password:

MONITOR ups@upsserver.internal 1 nutuser badpasswd slave

When I now start upsmon I get the expected login failure in syslog:

nut-monitor[3426]: Network UPS Tools upsmon 2.8.2.1
nut-monitor[3426]: Could not find PID file to see if previous upsmon instance is already running or not!
nut-monitor[3426]: UPS: ups@upsserver.internal (secondary) (power value 1)
nut-monitor[3426]: Using power down flag file /etc/killpower
nut-monitor[3427]: Login on UPS [ups@upsserver.internal] failed - got [ERR ACCESS-DENIED]

But I would expect to now see a UPS ups@upsserver.internal is unavailable message every NOCOMMWARNTIME seconds, with my notify script called and so on. But this doesn't happen at all, no unavaliable messages appear.

I also did a tcpdump to check what was transmitted over the connection to my upsd:

STARTTLS

ERR FEATURE-NOT-CONFIGURED

USERNAME nutuser

OK

PASSWORD badpasswd

OK

LOGIN ups

ERR ACCESS-DENIED

GET VAR ups ups.status

VAR ups ups.status "OL"

GET VAR ups ups.status

VAR ups ups.status "OL"

GET VAR ups ups.status

VAR ups ups.status "OL"

[...]

This looks like upsmon is still able to regularly get status information about the ups, even though the access was denied.

On the upsd side I have this in upsd.users:

[nutuser]
password = goodpasswd
upsmon slave

That upsd still gives upsmon information about the status of the ups, although the login was denied previously, looks to me like a problem too.

I'm using nut-2.8.2.1-0.el10_1.1.git20240703pr2505.x86_64 from Fedora EPEL for RHEL 10.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Incorrect or missing readingsOn some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.)enhancementimpacts-release-2.8.2Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)impacts-release-2.8.5Issues reported against NUT release 2.8.5 (maybe vanilla or with minor packaging tweaks)upsmon

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions