#926329 nut-server: upsd dies if upsd.conf contains LISTEN line with nonexistant ip

Package:
nut-server
Source:
nut
Description:
network UPS tools - core system
Submitter:
Jon Bendtsen
Date:
2023-11-13 17:36:04 UTC
Severity:
normal
Tags:
#926329#5
Date:
2019-04-03 15:10:34 UTC
From:
To:
Dear Maintainer,

After reconfiguring 1 network interface to a new range, but forgetting to remove the last line, then one with 192.168.123.9 from /etc/nut/upsd.conf

LISTEN 127.0.0.1 3493
LISTEN 192.168.119.253 3493
LISTEN 192.168.123.9 3493

The nut daemon refused to run after it at a later date was restarted. Syslog just reported:

Apr  2 20:54:11 dkfitlet upsd[16941]: Network UPS Tools upsd 2.7.4
Apr  2 20:54:11 dkfitlet upsd[16941]: not listening on 192.168.123.9 port 3493
Apr  2 20:54:11 dkfitlet upsd[16941]: listening on 192.168.119.253 port 3493
Apr  2 20:54:11 dkfitlet upsd[16941]: listening on 127.0.0.1 port 3493
Apr  2 20:54:11 dkfitlet upsd[16941]: no listening interface available

Notice the last line message: "no listening interface available" which is not true, as 2 out of 3 configured LISTEN addresses was available. Notice also that syslog does not say that upsd exitted.

After removing the bad line from upsd.conf "LISTEN 192.168.123.9 3493" everything started working fine.

I would expect that upsd listens to the addresses it can find and not just exit.