[Nut-upsuser] Fedora 40 nut-server not starting at boot

Rick Dicaire kritek at gmail.com
Sat Jul 27 23:22:15 BST 2024


Hi folks, I'm having an issue with getting nut-server to start at boot on a
freshly installed Fedora 40 desktop. Seems once the machine is up, I can
manually start with systemctl start nut-server and everythings fine.

dnf info nut
Last metadata expiration check: 2:08:11 ago on Sat 27 Jul 2024 03:48:13 PM
EDT.
Installed Packages
Name         : nut
Version      : 2.8.2
Release      : 1.fc40
Architecture : x86_64
Size         : 12 M
Source       : nut-2.8.2-1.fc40.src.rpm
Repository   : @System
>From repo    : updates
Summary      : Network UPS Tools
URL          : https://www.networkupstools.org/
License      : GPL-2.0-or-later AND GPL-3.0-or-later
Description  : These programs are part of a developing project to monitor
the assortment
             : of UPSes that are found out there in the field. Many models
have serial
             : ports of some kind that allow some form of state checking.
This
             : capability has been harnessed where possible to allow for
safe shutdowns,
             : live status tracking on web pages, and more.


I've tried with specific LISTEN lines in upsd.conf, also tried without one
specified. Same result, service doesn't start at boot. No apparent errors
reported either:

systemctl status nut-server
○ nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/usr/lib/systemd/system/nut-server.service; enabled;
preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)

In /usr/lib/systemd/system/nut-server.service there's mention of:

# The `upsd` is a networked service (even if bound to a `localhost`)
# so it requires that the OS has some notion of networking already.
# Extending the unit does not require *this* file to be edited, you
# can instead drop in an additional piece of configuration, e.g. to
# require that NUT data server only starts after external networking
# is configured (usable IP addresses appear in the system) you can
# add a `/etc/systemd/system/nut-server.service.d/network.conf` with:
#   [Unit]
#   Requires=network-online.target
#   After=network-online.target

However adding this file with those three lines (uncommented yes) still
results in no nut-server running, with and without LISTEN lines in
upsd.conf.

Since there's no issues starting the service manually after reboot, I feel
like this is some kind of systemd thing as opposed to a nut config issue.

Various config file contents:

nut.conf
MODE=netserver

ups.conf
maxretry = 3
[cp1500]
driver = usbhid-ups
port = auto
vendorid = 0764
pollinterval = 5
desc = "toshiba: TV, roku, switch"

upsd.conf
LISTEN 0.0.0.0 3493

upsmon.conf
MONITOR cp1500 at localhost 1 monuser monuserpass primary
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG "/etc/killpower"
 NOTIFYMSG ONLINE "UPS %s on line power"
 NOTIFYMSG ONBATT "UPS %s on battery"
 NOTIFYMSG LOWBATT "UPS %s battery is low"
 NOTIFYMSG FSD "UPS %s: forced shutdown in progress"
 NOTIFYMSG COMMOK "Communications with UPS %s established"
 NOTIFYMSG COMMBAD "Communications with UPS %s lost"
 NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding"
 NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced"
 NOTIFYMSG NOCOMM "UPS %s is unavailable"
 NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible"
 NOTIFYFLAG ONLINE SYSLOG+WALL
 NOTIFYFLAG ONBATT SYSLOG+WALL
 NOTIFYFLAG LOWBATT SYSLOG+WALL
 NOTIFYFLAG FSD SYSLOG+WALL
 NOTIFYFLAG COMMOK SYSLOG+WALL
 NOTIFYFLAG COMMBAD SYSLOG+WALL
 NOTIFYFLAG SHUTDOWN SYSLOG+WALL
 NOTIFYFLAG REPLBATT SYSLOG+WALL
 NOTIFYFLAG NOCOMM SYSLOG+WALL
 NOTIFYFLAG NOPARENT SYSLOG+WALL
OFFDURATION 30
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

Ultimately I need this service to listen on lan interface as I query it
from other lan machine.

Can anyone provide any insight on my issue?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20240727/96461b48/attachment.htm>


More information about the Nut-upsuser mailing list