-
I'm using SNMP on a CyberPower UPS with the management card installed. I have tried SNMP V3 and am now using V1 with default public community and allowing IP addresses on subnets for 10.10.0.0/16. I get continuous ups is unavailable logs. When I restart the UPS service, it says connect failed, connection refused. I've checked the firewall and there is a pass rule for udp/tcp connections, and the UPS status window is populating with all of the details of the UPS. I can't figure out how to stop the messages in the logs, or why they are being caused. I'm not using any additional UPS settings other than the snmp driver and entering the IP address of the UPS for the SNMP service.
Here are the logs:
2023-05-26 21:20:21.414264-04:00 upsmon 22448 UPS ups is unavailable 2023-05-26 21:20:16.411599-04:00 upsmon 22448 Communications with UPS ups lost 2023-05-26 21:20:16.411564-04:00 upsmon 22448 UPS [ups]: connect failed: Connection failure: Connection refused 2023-05-26 21:20:16.404934-04:00 upsmon 22004 Startup successful 2023-05-26 21:20:01.225730-04:00 upsmon 92008 Signal 15: exiting 2023-05-26 21:15:21.761481-04:00 upsmon 92008 UPS ups is unavailable 2023-05-26 21:10:16.484588-04:00 upsmon 92008 UPS ups is unavailable 2023-05-26 21:05:11.170895-04:00 upsmon 92008 UPS ups is unavailable
-
@sgnoc Yes, It's good to start with v1 and work your way up.
The concept that you have both "connect failed, connection refused" and a UPS status window populated with details of the UPS does not make sense. If you have UPS details it means that the connection has to be functional.
You haven't said anything about what version of pfSense or the NUT package that you are using.
For log entries, what you really need to show are the the entries for "snmp-ups" rather than entries for "upsmon".
Lastly: You don't need a firewall rule for outbound SNMP connections. The most common issues around SNMP v1 are that the UPS has snmp v1 disabled, or that the group is something other than "public".
-
@dennypage I hadn't noticed the logs, since it seemed to connect on the status page. This is confusing to me, since the status page loads and I'm still getting the 2 different types of logs.
I'm on the most up to date versions of both. pfsense 23.05 on the netgate-7100 router and using latest NUT 2.8.0_2
I tried to get this figured out by working with the settings, but still have the same result. I specified the community and mibs, to see if that would help (even though community is the default public), and it is still the same. Here are the snmp-ups and upsmon logs, which are still as confusing. I also changed the ups name to CyberPowerCP2200. No other NUT settings were changed.
Config (nothing set in the advanced section):
Here are the logs for upsmon and snmp-ups. I disabled and then set it back to remote-snmp, which generated the logs other than the regularly 5 minute timed logs of "UPS CyberPowerCP2200 is unavailable"
2023-05-27 08:47:38.622027-04:00 upsmon 5738 UPS CyberPowerCP2200 is unavailable 2023-05-27 08:47:33.785028-04:00 snmp-ups 6752 Startup successful 2023-05-27 08:47:33.735785-04:00 snmp-ups 5908 [CyberPowerCP2200] unhandled ASN 0x5 received from .1.3.6.1.4.1.3808.1.1.1.7.2.7.0 2023-05-27 08:47:33.619358-04:00 upsmon 5738 Communications with UPS CyberPowerCP2200 lost 2023-05-27 08:47:33.619329-04:00 upsmon 5738 UPS [CyberPowerCP2200]: connect failed: Connection failure: Connection refused 2023-05-27 08:47:33.612579-04:00 upsmon 5440 Startup successful 2023-05-27 08:47:20.585835-04:00 snmp-ups 13446 Signal 15: exiting 2023-05-27 08:47:20.577846-04:00 upsmon 12526 Signal 15: exiting 2023-05-27 08:44:23.063042-04:00 upsmon 12526 UPS CyberPowerCP2200 is unavailable 2023-05-27 08:39:22.785490-04:00 upsmon 12526 UPS CyberPowerCP2200 is unavailable 2023-05-27 08:34:17.510750-04:00 upsmon 12526 UPS CyberPowerCP2200 is unavailable 2023-05-27 08:29:12.261468-04:00 upsmon 12526 UPS CyberPowerCP2200 is unavailable
Here is the status window:
-
@sgnoc Good post, thank you. The UPS status field being empty is an issue.
Please remove the entries in the Extra Arguments to driver section. After doing that, please post the content of this file:
/usr/local/etc/nut/ups.conf
Also, please execute these commands:
upsc CyberPowerCP2200 snmpwalk -v 1 -c public 10.10.5.10 SNMPv2-SMI::enterprises.3808.1.1.1
and post the results.
-
@dennypage Here is the /usr/local/etc/nut/ups.conf
[CyberPowerCP2200] driver=snmp-ups port=10.10.5.10
Output of upsc CyberPowerCP2200:
battery.charge: 100 battery.current: 3.40 battery.runtime: 3300 battery.runtime.elapsed: 0 battery.voltage: 79.20 battery.voltage.nominal: 72 device.contact: Shaun device.description: UPS SNMP Card device.location: Basement device.mfr: CYBERPOWER device.model: OL2200RTXL2U device.serial: WBGEP2000038 device.type: ups driver.name: snmp-ups driver.parameter.pollinterval: 2 driver.parameter.port: 10.10.5.10 driver.parameter.synchronous: auto driver.version: 2.8.0 driver.version.data: cyberpower MIB 0.51 driver.version.internal: 1.21 input.frequency: 60 input.voltage: 122.70 output.current: 3.40 output.frequency: 60 output.voltage: 120 ups.delay.reboot: 0 ups.delay.shutdown: 180 ups.delay.start: 0 ups.firmware: S1A14 ups.load: 18 ups.mfr: CYBERPOWER ups.model: OL2200RTXL2U ups.serial: WBGEP2000038 ups.status:
Output of snmpwalk -v 1 -c public 10.10.5.10 SNMPv2-SMI::enterprises.3808.1.1.1:
SNMPv2-SMI::enterprises.3808.1.1.1.1.1.1.0 = STRING: "OL2200RTXL2U" SNMPv2-SMI::enterprises.3808.1.1.1.1.1.2.0 = STRING: "CP2200" SNMPv2-SMI::enterprises.3808.1.1.1.1.2.1.0 = STRING: "S1A14" SNMPv2-SMI::enterprises.3808.1.1.1.1.2.3.0 = STRING: "WBGEP2000038" SNMPv2-SMI::enterprises.3808.1.1.1.1.2.4.0 = STRING: "1.3.7" SNMPv2-SMI::enterprises.3808.1.1.1.1.2.5.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.1.2.6.0 = INTEGER: 2200 SNMPv2-SMI::enterprises.3808.1.1.1.1.2.7.0 = INTEGER: 1800 SNMPv2-SMI::enterprises.3808.1.1.1.1.2.8.0 = INTEGER: 180 SNMPv2-SMI::enterprises.3808.1.1.1.1.2.9.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.2.1.1.0 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.2.1.2.0 = Timeticks: (0) 0:00:00.00 SNMPv2-SMI::enterprises.3808.1.1.1.2.1.3.0 = STRING: "12/22/2022" SNMPv2-SMI::enterprises.3808.1.1.1.2.1.4.0 = INTEGER: 36 SNMPv2-SMI::enterprises.3808.1.1.1.2.2.1.0 = Gauge32: 100 SNMPv2-SMI::enterprises.3808.1.1.1.2.2.2.0 = Gauge32: 792 SNMPv2-SMI::enterprises.3808.1.1.1.2.2.3.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.2.2.4.0 = Timeticks: (330000) 0:55:00.00 SNMPv2-SMI::enterprises.3808.1.1.1.2.2.5.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.2.2.8.0 = INTEGER: 72 SNMPv2-SMI::enterprises.3808.1.1.1.2.2.9.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.3.1.1.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.3.2.1.0 = Gauge32: 1237 SNMPv2-SMI::enterprises.3808.1.1.1.3.2.2.0 = Gauge32: 1240 SNMPv2-SMI::enterprises.3808.1.1.1.3.2.3.0 = Gauge32: 1235 SNMPv2-SMI::enterprises.3808.1.1.1.3.2.4.0 = Gauge32: 600 SNMPv2-SMI::enterprises.3808.1.1.1.3.2.5.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.3.2.6.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.4.1.1.0 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.4.1.2.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.4.1.3.0 = STRING: "40~70 Hz" SNMPv2-SMI::enterprises.3808.1.1.1.4.2.1.0 = Gauge32: 1200 SNMPv2-SMI::enterprises.3808.1.1.1.4.2.2.0 = INTEGER: 600 SNMPv2-SMI::enterprises.3808.1.1.1.4.2.3.0 = Gauge32: 18 SNMPv2-SMI::enterprises.3808.1.1.1.4.2.4.0 = Gauge32: 34 SNMPv2-SMI::enterprises.3808.1.1.1.4.2.5.0 = Gauge32: 324 SNMPv2-SMI::enterprises.3808.1.1.1.4.2.6.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.4.2.7.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.5.1.1.0 = INTEGER: 24 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.1 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.2 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.3 = INTEGER: 3 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.4 = INTEGER: 4 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.5 = INTEGER: 5 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.6 = INTEGER: 6 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.7 = INTEGER: 7 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.8 = INTEGER: 8 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.9 = INTEGER: 9 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.10 = INTEGER: 10 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.11 = INTEGER: 11 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.12 = INTEGER: 12 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.13 = INTEGER: 13 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.14 = INTEGER: 14 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.1.15 = INTEGER: 15 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.1 = STRING: "Outlet1" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.2 = STRING: "Outlet2" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.3 = STRING: "Outlet3" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.4 = STRING: "Outlet4" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.5 = STRING: "Outlet5" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.6 = STRING: "Outlet6" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.7 = STRING: "Outlet7" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.8 = STRING: "Outlet8" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.9 = STRING: "Outlet9" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.10 = STRING: "Outlet10" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.11 = STRING: "Outlet11" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.12 = STRING: "Outlet12" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.13 = STRING: "Outlet13" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.14 = STRING: "Outlet14" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.2.15 = STRING: "Outlet15" SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.1 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.2 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.3 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.4 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.5 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.6 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.7 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.8 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.9 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.10 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.11 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.12 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.13 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.14 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.3.15 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.1 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.2 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.3 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.4 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.5 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.6 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.7 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.8 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.9 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.10 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.11 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.12 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.13 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.14 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.1.2.1.4.15 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.1.0 = INTEGER: 120 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.4.0 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.9.0 = Timeticks: (0) 0:00:00.00 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.10.0 = Timeticks: (18000) 0:03:00.00 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.11.0 = Timeticks: (18000) 0:03:00.00 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.13.0 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.14.0 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.15.0 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.16.0 = INTEGER: 0 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.17.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.18.0 = INTEGER: 20 SNMPv2-SMI::enterprises.3808.1.1.1.5.2.19.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.6.2.1.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.6.2.2.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.6.2.3.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.6.2.5.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.6.2.6.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.7.2.2.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.7.2.3.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.7.2.4.0 = STRING: "05/11/2023" SNMPv2-SMI::enterprises.3808.1.1.1.7.2.6.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.7.2.7.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.7.2.8.0 = NULL SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.1.1 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.1.2 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.1.3 = INTEGER: 3 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.1.4 = INTEGER: 4 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.1.5 = INTEGER: 5 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.2.1 = INTEGER: 4 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.2.2 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.2.3 = INTEGER: 3 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.2.4 = INTEGER: 4 SNMPv2-SMI::enterprises.3808.1.1.1.8.1.1.1.2.5 = INTEGER: 2 SNMPv2-SMI::enterprises.3808.1.1.1.10.1.0 = INTEGER: 1 SNMPv2-SMI::enterprises.3808.1.1.1.10.2.0 = Gauge32: 33
-
@sgnoc I've looked hard at this, and for the life of me I cannot see what is wrong. The snmp walk shows the correct status, but for some reason it's not being seen by upsd/upsmon.
Assuming that you want to keep going, the next step will be to run the snmp driver in debug mode.
First, do a ps, find the existing snmp-ups process and kill it. After that, run the following commands:
/bin/sh /usr/local/libexec/nut/snmp-ups -a ups -DDDDDD 2>&1 | tee /tmp/out
Let it run for about 100 seconds, and then kill it.
Post the /tmp/out file. It will be somewhere around 4000 lines, so please compress it before posting.
-
@sgnoc Btw, I assume the RMCARD firmware is up to date, yes?
-
@dennypage Yes, I double checked that the RMCARD is up to date. I'm not familiar with posting a compressed file here, what do I need to do for that? I'm working on getting the output now. Thanks.
-
@dennypage Here is the output in a text file compressed to .gz. Hope that works.
-
snmp-ups.gz @sgnoc That worked, thanks.
Clearly a bug:
32.274823 [D3] Entering nut_snmp_get_int() 32.274826 [D3] nut_snmp_get(.1.3.6.1.4.1.3808.1.1.1.4.1.1.0) 32.274828 [D3] nut_snmp_walk(.1.3.6.1.4.1.3808.1.1.1.4.1.1.0) 32.274839 [D4] nut_snmp_walk: max. iteration = 1 32.275454 [D2] SNMP UPS driver: entering su_status_set() 32.275462 [D1] su_find_infoval: no matching INFO_* value for this OID value (2) 32.275466 [D2] => value: 2
That OID is the ups.status. The "no matching INFO_* value is definitely incorrect.
This didn't make any sense until I started looking through the prior versions of the cyberpower-mib code. It turns out that this was a bug introduced in 2.8.0 (like so many others), and fixed very shortly thereafter.
The original bug report is here, and the fix was checked in here.
At this time, there is no release version of 8.x NUT that has the fix. However FreeBSD set up a "nut-devel" port to track the current dev tree, and I did a build from nut-devel build back in February to address a problem with the usb driver. I built the entire driver set at the time, including snmp-ups.
I've attached the build of snmp-ups that I did back in February. I expect that it will address the issue. Note that this build if for Intel / amd 64 bit. It will not work on arm (I don't have an arm system).
-
@dennypage what's involved getting this fix on arm? I have a Netgate 1100 where I'd like to get this working.
-
@dabernards said in NUT on SNMP V1 and V3 ups is unavailable:
what's involved getting this fix on arm?
You just need to do a build of nut-devel in FreeBSD Ports. I don't have an arm system (or a cross development system) or I would do it for you.
Or perhaps someone reading this with an arm system might volunteer to do a build?
-
@dennypage Thanks for the help and that it is a known bug, at least that makes more sense now.
I did swap the old snmp-ups for the one you built, but it is giving new errors. I'll post them here in case something jumps out that I may need to do an additional step, otherwise I'll just use the broken version until they finally release the free-bsd update that will get pushed to the package manager.
Below, I stop the service, move snmp-ups to snmp-ups-old, and then copy in your snmp-ups and set permissions to match. Owner/Group already were the same. When that was giving errors, I went back to the UPS GUI and saved the settings, to see if that would possibly trigger a restart that would work. Same result, but that's why you see 2 startups below.
2023-05-30 07:35:08.167112-04:00 upsmon 19088 Signal 15: exiting 2023-05-30 07:35:03.169246-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:58.159275-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:53.147750-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:48.137510-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:43.126722-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:38.124049-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:33.120445-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:28.112044-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:23.104408-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:18.097110-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:13.094863-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:08.092775-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:34:03.090538-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:33:58.079900-04:00 upsmon 19088 UPS CyberPowerCP2200 is unavailable 2023-05-30 07:33:58.079873-04:00 upsmon 19088 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:33:53.074942-04:00 upsmon 19088 Communications with UPS CyberPowerCP2200 lost 2023-05-30 07:33:53.074914-04:00 upsmon 19088 UPS [CyberPowerCP2200]: connect failed: Connection failure: Connection refused 2023-05-30 07:33:53.068205-04:00 upsmon 18344 Startup successful 2023-05-30 07:33:53.042591-04:00 upsmon 30616 Signal 15: exiting 2023-05-30 07:33:49.558079-04:00 upsmon 30616 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:33:44.555560-04:00 upsmon 30616 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:33:39.545766-04:00 upsmon 30616 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:33:34.541513-04:00 upsmon 30616 UPS CyberPowerCP2200 is unavailable 2023-05-30 07:33:34.541485-04:00 upsmon 30616 Poll UPS [CyberPowerCP2200] failed - Driver not connected 2023-05-30 07:33:29.531051-04:00 upsmon 30616 Communications with UPS CyberPowerCP2200 lost 2023-05-30 07:33:29.531025-04:00 upsmon 30616 UPS [CyberPowerCP2200]: connect failed: Connection failure: Connection refused 2023-05-30 07:33:29.524269-04:00 upsmon 29998 Startup successful 2023-05-30 07:28:33.520811-04:00 snmp-ups 36164 Signal 15: exiting 2023-05-30 07:28:33.513631-04:00 upsmon 35369 Signal 15: exiting 2023-05-30 07:24:12.929094-04:00 upsmon 35369 UPS CyberPowerCP2200 is unavailable 2023-05-30 07:19:07.657510-04:00 upsmon 35369 UPS CyberPowerCP2200 is unavailable 2023-05-30 07:14:02.354888-04:00 upsmon 35369 UPS CyberPowerCP2200 is unavailable 2023-05-30 07:08:57.067017-04:00 upsmon 35369 UPS CyberPowerCP2200 is unavailable
-
@sgnoc You won't see startup messages from the new snmp-ups because it is the wrong architecture and the OS cannot actually start the process. The upsmon messages indicate that the driver (snmp-ups) is not connected to upsd.
-
@dennypage the 7100 uses the Intel Atom CPU C3558, which the Intel site says is 64 bit architecture. Shouldn't that work on your 64 bit build? I thought it would be a simple swap out with the same architecture.
-
@sgnoc Sorry, I conflated you with the prior poster who is on a different arch.
There are no log entries for snmp-ups after you restarted, which means that the process did not start.
Double check that the executable is in the correct location, and that the ownership and permissions are the same as the previous version.
If all of that looks good, you try can starting snmp-ups by hand to see if it shows an error.
-
@dennypage I've been trying to get it to run. I had the correct permissions and user/group to match the previous binary, but still the same result loading it on the pfsense gui. I attempted to get it to start in command prompt.
The only combination of options to get it to even load was to run the nut service in the gui, which generated the logs that it wasn't loaded (as posted previously), then I ran the command:
sudo ./snmp-ups -s CyberPowerCP2200 -x port=10.10.5.10 -u nut
This at least ran the snmp-ups and I was able to get a log saying
Communications with UPS CyberPowerCP2200 established
But when I go to the gui status page, instead of "OK" in the status line, it shows "OL" which are the first 2 characters of the UPS model number. So, I'm guessing things still aren't quite right. Also the following messages were posted when I ran the binary from command prompt:
Network UPS Tools - Generic SNMP UPS driver 1.28 (11-eol-49673-g687a1b3d4995) Detected OL2200RTXL2U on host 10.10.5.10 (mib: cyberpower 0.52) [CyberPowerCP2200] unhandled ASN 0x5 received from .1.3.6.1.4.1.3808.1.1.1.7.2.7.0 WARNING: Needed to fix group access to filesystem socket of this driver, but failed; run the driver with more debugging to see how exactly. Consumers of the socket, such as upsd data server, can fail to interact with the driver and represent the device: /var/db/nut/snmp-ups-CyberPowerCP2200 Broadcast Message from root@netgate.gause3.lan (no tty) at 20:50 EDT... Communications with UPS CyberPowerCP2200 established
I wasn't able to find the parameters that are normally run from the NUT service to start the snmp-ups binary, so I'm still not sure why the service isn't able to get it started, but it also seems to still have some issues with the snmp data being received.
I'll just have to wait and see if an update gets pushed that might work. Until then, it seems like the buggy binary may still at least get snmp messages from the UPS in the event of power failure and battery usage. I'll go back to that and hope for the best until a new update is released. Thanks for the help.
-
@sgnoc run snmp-ups with debug as described above. Make sure that no other snmp-ups is running at the same time. Also run the upsc command while it is running.
-
@dennypage Thanks, running these again let me figure out the issue. I had to specify user as nut for the new version binary. I guess there was a default user change between the versions, and the new binary was getting permission denied errors for /var/db/nut using the user uucp. I set the parameter user=nut in the ups.conf and that fixed it not being able to start up.
New issue is the status is showing OL instead of Ok, so I'm guessing the snmp data isn't being parsed properly for cyberpower. I've attached a .gz file for the /tmp/out file I ran for another 100 seconds. I'm not really familiar with the snmp to understand the output properly.
Here is the output of the uspc command:
battery.charge: 100 battery.current: 3.30 battery.runtime: 3300 battery.runtime.elapsed: 0 battery.voltage: 79.10 battery.voltage.nominal: 72 device.contact: Shaun device.description: UPS SNMP Card device.location: Basement device.mfr: CYBERPOWER device.model: OL2200RTXL2U device.serial: WBGEP2000038 device.type: ups driver.name: snmp-ups driver.parameter.pollinterval: 2 driver.parameter.port: 10.10.5.10 driver.parameter.synchronous: auto driver.state: quiet driver.version: 11-eol-49673-g687a1b3d4995 driver.version.data: cyberpower MIB 0.52 driver.version.internal: 1.28 input.frequency: 60 input.voltage: 123.20 output.current: 3.30 output.frequency: 60 output.voltage: 120 ups.delay.reboot: 0 ups.delay.shutdown: 180 ups.delay.start: 0 ups.firmware: S1A14 ups.load: 18 ups.mfr: CYBERPOWER ups.model: OL2200RTXL2U ups.serial: WBGEP2000038 ups.status: OL
The summary status for the gui says on line, at least. So that's some progress with the new version.
***Edit: after I submitted this, I re-read my last line and it hit me that the ups.status OL isn't an error reading the first 2 characters of the model of OL, but is short for the status listed of "on line". Don't know why that didn't click before. So I think all I needed to do with your newer version binary was to change the user from the default uucp username to the old default of nut, and now I'm good to go.
Thanks for the help, I'll standby with this version until NUT pushed a free-bsd update at some point.***
Side note: still getting an unhandled error in the logs:
[CyberPowerCP2200] unhandled ASN 0x5 received from .1.3.6.1.4.1.3808.1.1.1.7.2.7.0
But I don't think that is negatively affecting anything.
-
@sgnoc The status field is made up of collections of character sequences separated by spaces:
OL: On line
OB: On Battery
LB: Low Battery
RB: Replace Battery
CAL: Runtime Calibration
FSD: Forced Shut DownWRT the unhandled oid, correct that you don’t need to worry about it.