UPS Connections issues

Hello! I have a Cyber Power CP1350AVRLCD3. I am having issues trying to get it connect to TrueNAS Core. My error codes I do not understand and I don’t know how to fix this issue. See Screenshot below the logs. If someone could please be helpful to me and explain what is going on and how to fix it, I’d very much appreciate it!

Aug  8 02:42:45 truenas ugen2.2: <CPS CP1350AVRLCD3> at usbus2
Aug  8 02:42:47 truenas 1 2024-08-08T02:42:47.108554-04:00 truenas.local upsmon 3119 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:42:52 truenas 1 2024-08-08T02:42:52.109722-04:00 truenas.local upsmon 3119 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:42:57 truenas 1 2024-08-08T02:42:57.111557-04:00 truenas.local upsmon 3119 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:43:02 truenas 1 2024-08-08T02:43:02.113565-04:00 truenas.local upsmon 3119 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:43:07 truenas 1 2024-08-08T02:43:07.121556-04:00 truenas.local upsmon 3119 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:43:12 truenas 1 2024-08-08T02:43:12.124158-04:00 truenas.local upsmon 3119 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:43:12 truenas 1 2024-08-08T02:43:12.633420-04:00 truenas.local upsmon 3118 - - upsmon parent: read
Aug  8 02:43:12 truenas 1 2024-08-08T02:43:12.748149-04:00 truenas.local root 3321 - - /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Aug  8 02:43:12 truenas 1 2024-08-08T02:43:12.770669-04:00 truenas.local upsmon 3330 - - UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
Aug  8 02:43:12 truenas 1 2024-08-08T02:43:12.770680-04:00 truenas.local upsmon 3330 - - Communications with UPS ups@localhost:3493 lost
Aug  8 02:43:13 truenas 1 2024-08-08T02:43:13.256573-04:00 truenas.local collectd 3372 - - nut plugin: nut_connect: upscli_connect (localhost, 3493) failed: Connection failure: Connection refused
Aug  8 02:43:13 truenas 1 2024-08-08T02:43:13.534661-04:00 truenas.local collectd 3429 - - nut plugin: nut_connect: upscli_connect (localhost, 3493) failed: Connection failure: Connection refused

My general configu looks like this.

I got connection refused error while uploading config on a fresh install after mainboard change.
I realised there was a BIOS setting disabled for USB ports (sorry didn’t remember exactly what), after reboot i stopped the service → swap USB ports → enabled service and It start work properly.

This particular motherboard hasn’t had anything changed with it’s USB ports in the bios. It’s an Asus Z87-A motherboard that was my old streaming/gaming system. So I don’t know what I could do to fix the issue. Would it be worth it to reset the bios back to stock settings and see if TrueNAS behaves itself? I know some other people have run into similar issues and iXSystems isn’t great about support unless it’s a system they made. Is there anything else I should try to fix the issue?

I got this problem again, occur on reboot.
This time stop/run service didn’t fix, only reboot again keep connection up.
I don’t understand a thing about your case, for me when connection Is up Is pretty stable… Despite you can’t connect never or as me you Just lose It on certain events?

For me, it just throws the error I posted from the Logs in my original message. So I don’t understand what it’s looking to connect to the UPS over USB.

How do you setup the UPS Service, and is running correctly despite the error?
Have you check if you are using the correct driver, and what ups are you using?
Maybe with some more info we can help you debug this problem

It’s not running, that’s the issue, I flip the little switch option in TrueNAS and the thing starts throwing a giant ass hissy fit over how it can’t “connect” to whatever the hell it’s looking for with no way to explain how to solve the issue. It’s pretty bad that iXSystems has this feature that literally works so poorly. I just want my UPS to work the way I know a “normal” UPS is supposed to work.

Hi there, sorry you are so agitated by your experience.

I backtracked to your initial post - by my read you should be using the usbhid-ups driver and not the one you chose. see the NUT list at Network UPS Tools - Hardware compatibility list

I suggest you start again with this different driver choice.

Also, until you get it working, or close to, why not change the monitor user to the default upsmon …

First of all, sorry to sound so agitated, TrueNAS drives me nuts sometimes, so I am sorry for the poor tone of the response. Second, I had during testing, changed the “username” to something different as a test, but did revert it back to the defaults, third, it looks like TrueNAS Core established a link with the UPS, but I’d have to fake a power outage, perhaps try unplugging the UPS, to see if it truly is work. This is MORE positive progress than I had before at least. Thank you!

EDIT: I did some testing by doing a “fake power outage” i.e. just unplugged the UPS from Line Power, and the server saw the “event” happen and posted the alert to a Discord channel I have just for all my TrueNAS Core Server alerts! Thank YOU SO MUCH! Glad to finally have this problem solved off the back of my mind.

EDIT 2: Is there a way to have the server do self-tests on the battery, and then have some kind of reporting sent out as an alert as to whether the self-test passed or not?

EDIT 3 UPDATE: Ok this was weird, I was doing a copy to my TrueNAS Core Server and while it was copying it kept losing connection state with the UPS, and then reconnecting after a few seconds. What would cause this issue? I did also try a different USB port, but as of writing this at 1:54AM EST, I am still monitoring the connection status.

Glad things are looking up!

That’s your standard and necessary test!

I imagine that you can find the necessary commands required to use in a script to initiate a self-test and report in the NUT information at Network UPS Tools - Documentation

I would start by looking at messages on the console to try to track that down - starting with suspecting a USB issue as you apparently did. As it was working, I would first reboot the UPS (which will shutdown and reinitialize the outputs) to get the unit into a refreshed state.

Ordinarily the UPS would handle this on its own–at least, my APC units do. The testing, that is. I’d expect TrueNAS would warn if the test had failed, but I’m not certain there.

Yes, “more recent” APC units do auto self-tests. As far as I know, Cyber Power units do not (my 2 don’t anyway). Their “Power Panel” UPS support software will provide a self-test capability, but is not useful for our applications using NUT.