[Nut-upsuser] UPS not shutting down, no syslogs; no wall messages plus other problems

M Man mman22 at hotmail.com
Sun Aug 9 13:53:40 BST 2026


Hello
I have a APC1400 UPS connected to a IPFire machine (Primary) and a Proxmox  server (Secondary)
I'm finding that when powering off the UPS, the prim and secondary pc's don't show any messages on the consoles (wall).
The primary does not get logs from the upssched-cmd script - I don't think the script gets called at anytime

For a test,
set the lowbatt to 85 in the prim ups.conf and at 85%, the secondary shutdown (great) but the primary just sits there.
The UPS never shutdown down the power outlets - (maybe this is a lower level setting somewhere else) - so when power is applied, the proxmox server does not restart after shutdown.

The primary logs also shows "upsmon[2165]: OS user = not found" and various "NOTIFY_STATE_READY_WITH_PID" which maybe causing the above problems ???

Sorry for the long post, just trying to give you all the info

Leigh

Info/setting/logs/error below

Primary
IPFire 2.29 - core 203
Nut 2.8.4-15
Nut built with
                        ./configure \
                                --prefix=/usr \
                                --sysconfdir=/etc/nut \
                                --with-usb \
                                --with-user=root \
                                --with-group=nut \
                                --with-wrap=no \
                                --with-udev-dir=/etc/udev \
                                --disable-static \
                                --without-docs \
                                --with-dev


Secondary
Proxmox 9.2.9
Nut 2.8.1

# Primary #
Nut Config files /etc/nut

<<nut.conf>>
MODE=netserver

<<ups.conf>>
# Back-UPS XS 1400U
[apc]
  driver = usbhid-ups
  port = auto
  desc = "UPS on IPFire PC"
  maxretry = 3
  vendorid = 051d
  productid = 0002
  bus = "003"
  user: nutmon
  ignorelb = 1
  #override.battery.charge.low = 30
  #override.battery.runtime.low = 180
  lowbatt = 40
 
# The delays below cause problems
#  offdelay = 60
#  onedelay = 70

<<upsd.conf>>
LISTEN 0.0.0.0 3493

<<upsd.users>>
[upsmonitor]
    password = PRIM_passwd123
    actions = set
    actions = fsd
    instcmds = all
    upsmon primary

[observer]
    password = SEC_123passwd
    upsmon secondary

<<upsmon.conf>>
MONITOR apc at 192.168.100.1 1 upsmonitor PRIM_passwd123 primary

RUN_AS_USER = nut
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POWERDOWNFLAG "/run/nut/killpower"

POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
OFFDURATION 30
FINALDELAY 60

NOTIFYCMD /usr/sbin/upssched

# Message %s is the apc UPS

NOTIFYMSGONLINE "UPS %s: Online power."
NOTIFYMSGONBATT "UPS %s: Onbattery."
NOTIFYMSGLOWBATT "UPS%s: Battery is low."
NOTIFYMSGREPLBATT "UPS %s:Battery needsto be replaced."
NOTIFYMSGFSD "UPS%s: Forced shutdown in progress."
NOTIFYMSGSHUTDOWN "Auto logout and shutdown proceeding."
NOTIFYMSGCOMMOK "UPS %s: Communications (re-)established."
NOTIFYMSGCOMMBAD "UPS%s: Communicationslost."
NOTIFYMSGNOCOMM "UPS %s: Notavailable."
NOTIFYMSGNOPARENT "upsmonparent dead, shutdown impossible."

# Flags
# EXEC calls the NOTIFYCMD script with the message

NOTIFYFLAGONLINE SYSLOG+WALL+EXEC
NOTIFYFLAGONBATT SYSLOG+WALL+EXEC
NOTIFYFLAGLOWBATT SYSLOG+WALL+EXEC
NOTIFYFLAGREPLBATT SYSLOG+WALL
NOTIFYFLAGFSD SYSLOG+WALL
NOTIFYFLAGSHUTDOWN SYSLOG+WALL
NOTIFYFLAGCOMMOK SYSLOG+WALL
NOTIFYFLAGCOMMBAD SYSLOG+WALL
NOTIFYFLAGNOCOMM SYSLOG+WALL
NOTIFYFLAGNOPARENT SYSLOG+WAL

<<upssched.conf>>
CMDSCRIPT /etc/nut/upssched-cmd
PIPEFN /var/state/ups/upssched.pipe
LOCKFN /var/state/ups/upssched.lock

<<upssched-cmd>>
#!/bin/bash -u
# upssched-cmd   --primary-
logger -i -t upssched-cmd Primary Calling upssched-cmd $1

case $1 in
   online) MSG="apc UPS - power supply had been restored." ;;
   onbatt) MSG="apc UPS -  power failure- save your work!" ;;
   lowbatt) MSG="apc UPS - shutdown now!" ;;
   *) logger -i -t upssched-cmd "Bad arg: \"$1\""
     exit 1 ;;
esac


/etc/nut permissions
drwxr-xr-x  6 root nut 4096 Aug  7 19:04 .
drwxr-xr-x 53 root root 4096 Aug  7 19:25 ..
-rw-r-----  1 root nut    54 Aug  5 13:56 nut.conf
-rw-r-----  1 root nut   412 Aug  6 19:56 ups.conf
-rw-r-----  1 root nut    75 Aug  5 14:00 upsd.conf
-rw-r-----  1 root nut   227 Aug  5 14:01 upsd.users
-rw-r-----  1 root nut  1584 Aug  7 18:57 upsmon.conf
-rwxr-x---  1 root nut   499 Aug  5 13:34 upssched-cmd
-rw-r-----  1 root nut   143 Aug  4 17:14 upssched.conf



# Secondary #
Proxmox server

<<nut.conf>>
MODE=netclient

<<upsmon.conf>>
MONITOR apc at 192.168.100.1 1 observer SEC_123passwd secondary

RUN_AS_USER = nut

MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
RBWARNTIME 43200
NOCOMMWARNTIME 600

POWERDOWNFLAG /etc/killpower

NOTIFYCMD /usr/sbin/upssched

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+EXEC
NOTIFYFLAG ONBATT   SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT  SYSLOG+WALL+EXEC
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

<<upssched.conf>>
CMDSCRIPT /etc/nut/upssched-cmd
PIPEFN /run/nut/upssched.pipe
LOCKFN /run/nut/upssched.lock

AT ONLINE apc at 192.168.100.1 EXECUTE online
AT ONBATT apc at 192.168.100.1 EXECUTE onbatt
AT LOWBATT apc at 192.168.100.1 EXECUTE lowbatt

<<upssched-cmd>>
#!/bin/bash -u
# upssched-cmd   --secondary-
logger -i -t upssched-cmd Calling upssched-cmd $1

case $1 in
   online) MSG="UPS-1- power supply had been restored." ;;
   onbatt) MSG="UPS-1- power failure- save your work!" ;;
   lowbatt) MSG="UPS-1- shutdown now!" ;;
   *) logger -i -t upssched-cmd "Bad arg: \"$1\""
     exit 1 ;;
esac
 
/etc/nut permissions
drwxr-xr-x  4 root nut  4096 Aug  8 10:58 .
drwxr-xr-x 99 root root 4096 Aug  7 19:44 ..
-rw-r-----  1 root nut    53 Aug  5 14:13 nut.conf
-rw-r-----  1 root nut  1127 Aug  8 10:58 upsmon.conf
-rwxr-x---  1 root nut   593 Jul 26 12:03 upssched-cmd
-rw-r-----  1 root nut   581 Aug  5 15:56 upssched.conf


# Errors/Logs/Info #
 
# Primary #
/var/log/messags
Aug  8 16:13:13 ipfire usbhid-ups[2157]: using 'battery.charge' to set battery low state
Aug  8 16:13:13 ipfire usbhid-ups[2157]: using 'battery.runtime' to set battery low state
Aug  8 16:13:13 ipfire usbhid-ups[2157]: Listening on socket /var/state/ups/usbhid-ups-apc
Aug  8 16:13:13 ipfire usbhid-ups[2161]: Startup successful
Aug  8 16:13:13 ipfire usbhid-ups[2161]: upsnotify: notify about state NOTIFY_STATE_READY_WITH_PID with libsystemd: was requested, but not running as a service unit now, will not spam more about it
Aug  8 16:13:13 ipfire usbhid-ups[2161]: upsnotify: failed to notify about state NOTIFY_STATE_READY_WITH_PID: no notification tech defined, will not spam more about it
Aug  8 16:13:13 ipfire usbhid-ups[2161]: upsnotify: logged the systemd watchdog situation once, will not spam more about it
Aug  8 16:13:13 ipfire upsd[2162]: listening on 0.0.0.0 port 3493
Aug  8 16:13:13 ipfire upsd[2162]: Connected to UPS [apc]: usbhid-ups-apc
Aug  8 16:13:13 ipfire upsd[2162]: Found 1 UPS defined in ups.conf
Aug  8 16:13:13 ipfire usbhid-ups[2161]: sock_connect: enabling asynchronous mode (auto)
Aug  8 16:13:13 ipfire upsd[2163]: Startup successful
Aug  8 16:13:13 ipfire upsd[2163]: upsnotify: notify about state NOTIFY_STATE_READY_WITH_PID with libsystemd: was requested, but not running as a service unit now, will not spam more about it
Aug  8 16:13:13 ipfire upsd[2163]: upsnotify: failed to notify about state NOTIFY_STATE_READY_WITH_PID: no notification tech defined, will not spam more about it
Aug  8 16:13:13 ipfire upsd[2163]: upsnotify: logged the systemd watchdog situation once, will not spam more about it
Aug  8 16:13:13 ipfire upsmon[2165]: Startup successful
Aug  8 16:13:13 ipfire upsmon[2165]: OS user = not found

# Battery status
upsc apc at 192.168.100.1:3493

battery.charge: 100
battery.charge.low: 85
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2016/12/20
battery.runtime: 5840
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 28.2
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS XS 1400U
device.serial: 3B1651X00698
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.flag.ignorelb: enabled
driver.name: usbhid-ups
driver.parameter.bus: 003
driver.parameter.interrupt_pipe_no_events_tolerance: -1
driver.parameter.lowbatt: 85
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0002
driver.parameter.synchronous: auto
driver.parameter.vendorid: 051d
driver.state: quiet
driver.version: 2.8.4
driver.version.data: APC HID 0.100
driver.version.internal: 0.67
driver.version.usb: libusb-1.0.30 (API: 0x0100010C)
input.sensitivity: medium
input.transfer.high: 280
input.transfer.low: 155
input.voltage: 228.0
input.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 926.T2 .I
ups.firmware.aux: T2
ups.load: 9
ups.mfr: American Power Conversion
ups.mfr.date: 2016/12/20
ups.model: Back-UPS XS 1400U
ups.productid: 0002
ups.realpower.nominal: 700
ups.serial: 3B1651X00698
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d


# Secondary #
Aug 08 11:08:24 hpe800 nut-monitor[1081]: upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
Aug 08 11:08:24 hpe800 nut-monitor[1081]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
Aug 08 11:08:24 hpe800 nut-monitor[1081]: upsnotify: logged the systemd watchdog situation once, will not spam more about it

Aug 08 16:13:15 hpe800 nut-monitor[4217]: Network UPS Tools upsmon 2.8.1
Aug 08 16:16:35 hpe800 nut-monitor[1087]: UPS apc at 192.168.100.1 on battery
Aug 08 16:16:35 hpe800 nut-monitor[4890]: Network UPS Tools upsmon 2.8.1

Aug 08 16:21:40 hpe800 nut-monitor[1087]: UPS apc at 192.168.100.1 battery is low
Aug 08 16:21:40 hpe800 nut-monitor[6655]: Network UPS Tools upsmon 2.8.1
Aug 08 16:22:00 hpe800 nut-monitor[1087]: Giving up on the primary for UPS [apc at 192.168.100.1] after 20 sec since last comms
Aug 08 16:22:00 hpe800 nut-monitor[1087]: Executing automatic power-fail shutdown
Aug 08 16:22:00 hpe800 nut-monitor[1087]: Auto logout and shutdown proceeding
Aug 08 16:22:00 hpe800 nut-monitor[6775]: Network UPS Tools upsmon 2.8.1
Aug 08 16:22:05 hpe800 nut-monitor[1087]: Network UPS Tools upsmon 2.8.1

Aug 08 16:22:05 hpe800 shutdown[6826]: Shutdown scheduled for Sat 2026-08-08 16:23:05 CEST, use 'shutdown -c' to cancel.
Aug 08 16:22:05 hpe800 nut-monitor[1073]: Network UPS Tools upsmon 2.8.1
Aug 08 16:22:05 hpe800 systemd[1]: nut-monitor.service: Deactivated successfully.




More information about the Nut-upsuser mailing list