TrueNAS loses connection to UPS

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
I have an Eaton 5PX rackmount ups with a NM card and I am using the snmp driver to connect from TrueNAS to the UPS. When I set it up, I am able to connect to the UPS and get the diagnostic data from it. Initially I used Eaton ups 5 EX RT (SNMP) NMC Transverse card (ref 66...) -- because that was the first SNMP related driver under Eaton

After some time (not sure how much time) my console gets flooded with
Code:
Connection refused
Aug  7 09:29:39 truenas 1 2023-08-07T09:29:39.880459-05:00 truenas.lan.mydomain.com upsmon 1307 - - UPS [eaton5px@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  7 09:29:44 truenas 1 2023-08-07T09:29:44.924950-05:00 truenas.lan.mydomain.com upsmon 1307 - - UPS [eaton5px@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  7 09:29:49 truenas 1 2023-08-07T09:29:49.994582-05:00 truenas.lan.mydomain.com upsmon 1307 - - UPS [eaton5px@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  7 09:29:55 truenas 1 2023-08-07T09:29:55.019080-05:00 truenas.lan.mydomain.com upsmon 1307 - - UPS [eaton5px@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  7 09:30:00 truenas 1 2023-08-07T09:30:00.030473-05:00 truenas.lan.mydomain.com upsmon 1307 - - UPS [eaton5px@localhost:3493]: connect failed: Connection failure: Connection refused

This also causes a flood of emails to me since I have set it up to check every 5 minutes.
1691419738205.png


Then I have to go back into Services-->UPS configuration and change the snmp driver to some other snmp driver. For eg. Eaton pdu 5 ePDU Managed(snmp-ups)
Then the connection works again after saving the settings for UPS service.

A reboot of TrueNAS definitely causes this issue (I just tested it) where I have to change the driver in the UPS settings, but I am not yet able to figure out how much time it works without reboot.

Is there a fix available for this?

EDIT: I also have set up the same UPS in OpnSense (a separate box) and I have no problems of these connection failures on the OpnSense box.
 
Last edited:
Joined
Oct 22, 2019
Messages
3,641
What are the rest of your options? The screenshot is cropped.
 

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
What are the rest of your options? The screenshot is cropped.
I cropped it because it had my email address listed.

In terms of options, nothing except
Code:
pollfreq = 45
in ups.conf
Here's the screenshot of the bottom half of the UPS configuration
1691422342619.png
 
Joined
Oct 22, 2019
Messages
3,641
Back in May of this year, I was getting bombarded with incessant emails about my UPS losing communication; paired with flooding my logs with the same errors.

Haven't had any issues since I applied the following settings in this particular combination. (I had to play around with the best combination until I landed on something that works consistently.)

For me, it's about 99% resolved, now three months out. I will occasionally get a message about the UPS losing connection, but it fixes itself and is very rare now.

My unit is a CyberPower over USB, so this might have zero effect for you, but it's worth a shot.

Here are the four values I settled on:
ups-config.png



* I manually stopped and started the UPS service every time I changed any values, just to rule out the possibility of the settings not being used.
 

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
Thanks, I appreciate it. I'll try out the same and see if it reduces the issues and keep monitoring over the next few weeks.
 
Top