Jarrod Coombes
2021-Nov-22 02:28 UTC
[Nut-upsuser] UPS Monitor Won't Start: invalid directive monitor
When I try to start the UPS monitor service I get: Starting Network UPS Tools - power device monitor and shutdown controller... fopen /run/nut/upsmon.pid: No such file or directory /etc/nut/upsmon.conf line 86: invalid directive monitor APC-t at localhost 1 admin <8 random letters> master /etc/nut/upsmon.conf line 87: invalid directive monitor APC-b at localhost 1 admin <8 random letters> master Using power down flag file /etc/killpower Network UPS Tools upsmon 2.7.4 Fatal error: insufficient power configured! Sum of power values........: 0 Minimum value (MINSUPPLIES): 1 Edit your upsmon.conf and change the values. nut-monitor.service: Control process exited, code=exited, status=1/FAILURE nut-monitor.service: Failed with result 'exit-code'. Failed to start Network UPS Tools - power device monitor and shutdown controller. Restarting the NUT server works: Connected to UPS [APC-b]: usbhid-ups-APC-b Connected to UPS [APC-t]: usbhid-ups-APC-t Connected to UPS [APC-b]: usbhid-ups-APC-b Connected to UPS [APC-t]: usbhid-ups-APC-t Startup successful Started Network UPS Tools - power devices information server. Data for UPS [APC-t] is stale - check driver Data for UPS [APC-b] is stale - check driver UPS [APC-t] data is no longer stale UPS [APC-b] data is no longer stale nut-scanner returns: $ *nut-scanner -q* SNMP library not found. SNMP search disabled. Neon library not found. XML search disabled. IPMI library not found. IPMI search disabled. [nutdev1] driver = "usbhid-ups" port = "auto" vendorid = "051D" productid = "0002" bus = "001" [nutdev2] driver = "usbhid-ups" port = "auto" vendorid = "051D" productid = "0002" bus = "001" The two UPSes are identical, so I created some custom udev rules to create /dev/apc-t and /dev/apc-b and this appears to work. I can run *ls /dev/a** and get: /dev/apc-b /dev/apc-t /dev/autofs This does work, and I can get info from the UPSes, and have verified that the info is different, so there is no conflict with duplication (see below, note the serial numbers are different in the list of data). When I run *upsc APC-t at localhost* I get: Init SSL without certificate database battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.mfr.date: 2020/01/29 battery.runtime: 1320 battery.runtime.low: 120 battery.temperature: 27.4 battery.type: PbAc battery.voltage: 27.5 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Smart-UPS 1500 RM device.serial: xxxxxxxx855 device.type: ups driver.name: usbhid-ups driver.parameter.bus: 001 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 1 driver.parameter.port: /dev/apc-t driver.parameter.productid: 0002 driver.parameter.serial: xxxxxxxx855 driver.parameter.synchronous: no driver.parameter.vendorid: 051D driver.version: 2.7.4 driver.version.data: APC HID 0.96 driver.version.internal: 0.41 input.sensitivity: high input.transfer.high: 127 input.transfer.low: 106 input.voltage: 121.6 output.frequency: 60.0 output.voltage: 121.6 output.voltage.nominal: 120.0 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.firmware: 617.3.D ups.firmware.aux: 8.1 ups.load: 28.6 ups.mfr: American Power Conversion ups.mfr.date: 2007/08/29 ups.model: Smart-UPS 1500 RM ups.productid: 0002 ups.serial: AS0735130855 ups.status: OL ups.test.result: No test initiated ups.timer.reboot: -1 ups.timer.shutdown: -1 ups.timer.start: -1 ups.vendorid: 051d When I run *upsc APC-b at localhost* I get: Init SSL without certificate database battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.mfr.date: 2020/01/29 battery.runtime: 1020 battery.runtime.low: 120 battery.temperature: 27.9 battery.type: PbAc battery.voltage: 27.5 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Smart-UPS 1500 RM device.serial: xxxxxxxx867 device.type: ups driver.name: usbhid-ups driver.parameter.bus: 001 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 1 driver.parameter.port: /dev/apc-b driver.parameter.productid: 0002 driver.parameter.serial: xxxxxxxx867 driver.parameter.synchronous: no driver.parameter.vendorid: 051D driver.version: 2.7.4 driver.version.data: APC HID 0.96 driver.version.internal: 0.41 input.sensitivity: high input.transfer.high: 127 input.transfer.low: 106 input.voltage: 122.4 output.frequency: 60.0 output.voltage: 122.4 output.voltage.nominal: 120.0 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.firmware: 617.3.D ups.firmware.aux: 8.1 ups.load: 48.7 ups.mfr: American Power Conversion ups.mfr.date: 2007/08/29 ups.model: Smart-UPS 1500 RM ups.productid: 0002 ups.serial: AS0735130867 ups.status: OL ups.test.result: No test initiated ups.timer.reboot: -1 ups.timer.shutdown: -1 ups.timer.start: -1 ups.vendorid: 051d At this point I have no idea what to do to get this work, nor what I am doing wrong. I have confirmed that my configs match the documentation, but the error I am getting is completely undocumented and Google searches are not helping either. Here are all the config files. *ups.conf* maxretry = 3 pollinterval = 1 [APC-t] driver = usbhid-ups port = /dev/apc-t desc = "APC UPS - Top" vendorid = 051D productid = 0002 bus = 001 serial = "xxxxxxx855" [APC-b] driver = usbhid-ups port = /dev/apc-b desc = "APC UPS - Bottom" vendorid = 051D productid = 0002 bus = 001 serial = "xxxxxxx867" *nut.conf* MODE=netserver *upsd.conf*``` LISTEN 0.0.0.0 3493 upsd.users [admin] password = <8 random letters> upsmon master ``` *upsmon.conf*``` RUN_AS_USER root monitor APC-t at localhost 1 admin <8 random letters> master monitor APC-b at localhost 1 admin <8 random letters> master MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5 ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20211121/5332559c/attachment.htm>
Charles Lepple
2021-Nov-22 03:21 UTC
[Nut-upsuser] UPS Monitor Won't Start: invalid directive monitor
On Nov 21, 2021, at 9:28 PM, Jarrod Coombes via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> wrote:> > When I try to start the UPS monitor service I get: > > Starting Network UPS Tools - power device monitor and shutdown controller... > fopen /run/nut/upsmon.pid: No such file or directory > /etc/nut/upsmon.conf line 86: invalid directive monitor APC-t at localhost 1 admin <8 random letters> master > /etc/nut/upsmon.conf line 87: invalid directive monitor APC-b at localhost 1 admin <8 random letters> master^^^^^^^ most of NUT is case-sensitive, so this should be "MONITOR".> The two UPSes are identical, so I created some custom udev rules to create /dev/apc-t and /dev/apc-b and this appears to work. I can run ls /dev/a* and get: > > /dev/apc-b /dev/apc-t /dev/autofsIf these dev nodes work, it is just coincidence - the usbhid-ups driver cannot open a specific UPS by a /dev node, and the port option is ignored: https://networkupstools.org/docs/man/usbhid-ups.html#_implementation In your case, it sounds like you can specify "serial =" for each UPS in ups.conf.> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser