NUT is driving me NUTS!!!

Started by NW4FUN, March 19, 2022, 05:35:49 PM

Previous topic - Next topic
Hello,
I've upped my appliance with new HW and also equipped the rack with a new POWERWALKER UPS and had a clean install of OPNsense. Currently running 22.1.3

I've enabled USBHID in STANDALONE mode first and NUT refuses to start and basically freezes my GUI for ~30secs
I've then switched to BLAZERUSB in STANDALONE, same issue.

I'm totally lost and not sure how to fix this, moreover, oddly enough, when I tried to reinstall the plugin itself I find all my previous settings already configured in the GUI

WHAT AM I MISSING???

:-[

March 19, 2022, 07:27:49 PM #1 Last Edit: March 19, 2022, 07:37:34 PM by aimdev
Is there an issue with your new HW's USB setting in the Bios?
Does NUT support your new UPS?
Have you run the diagnostics to see if NUT is communicating with the UPS?

How did you do this? (I didn't need to)
I've enabled USBHID in STANDALONE mode first

I had no issues running NUT, it just worked in 21.1 and 22.n

Perhaps you could try your new UPS on the old HW to see if there is an issue?

What should I check in the BIOS USB wise?
NUT does support my new UPS according to the NUT plugin website

How can I run diagnostics? It freezes for ~30 secs doing nothing.


March 19, 2022, 09:17:58 PM #3 Last Edit: March 28, 2022, 08:07:41 PM by pmhausen
What version of NUT is in OPNSense? `pkg info` should tell you.

The NUT port has been shamefully outdated for years, because the NUT team could not bother to tag a new release. Now it seems that in late 2021 finally we are seeing a couple of fresh releases instead of "just pull from github and compile yourself". The FreeBSD port already caught up - I checked with freshports.org - but possibly OPNsense didn't.

The current version should be 2.7.4:
https://www.freshports.org/sysutils/nut/

HTH,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: NW4FUN on March 19, 2022, 08:34:00 PM
What should I check in the BIOS USB wise?
NUT does support my new UPS according to the NUT plugin website

How can I run diagnostics? It freezes for ~30 secs doing nothing.

Log in as root via the console, select the shell option, then run the command
usbconfig

You should see a line showing your UPS.
If not, then you could go into the bios's of each HW, and compare the settings.

If the UPS is present then you should see the UPS diagnostics on the GUI.



It would benefit the community if you could inform us if you resolved the issue, including what you did to achieve success.


I gave in on making the standalone setting working...

What I've done instead, I plugged my UPS into my Sinology NAS and hooking up OPNsense into it via net client.

Whilst I don't like the design of it (extra point of failure/unnecessary middleware), at least I can poll info out and trigger a shutdown event in the unlikely event of power failure.

My Synology, DS212j, uses NUT, so if yours works on your Synology, and it has this file
/etc/ups/ups.conf
with
[ups]
   driver = usbhid-ups

in it, then it suggests there is an issue on the opnsense hardware setup, possibly usb.

My opnsense status shows two processes
nut_daemon   Network UPS Tools    
nut_upsmon   Network UPS Monitor

And the diagnostics from the NUT service page
driver.name: usbhid-ups


Synology is Linux based and OPNsense is FreeBSD and as I wrote there have been problems with the usb-hid interface on FreeBSD. Which version of NUT does OPNsense use? pkg info will tell you.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: pmhausen on March 30, 2022, 06:30:48 PM
Synology is Linux based and OPNsense is FreeBSD and as I wrote there have been problems with the usb-hid interface on FreeBSD. Which version of NUT does OPNsense use? pkg info will tell you.

The OP changed ups and hardware, and I was trying to get him to try different combinations to identify the issue.
I am using an Ellipse Pro on the latest opnsense version (and the previous ones) with whatever the NUT version is, with a NAS (not the Synology one) also on the same ups, client - server setup.
Never had any issues with versions 21 or 22.

Can't you just please do a pkg info on your OPNsense and tell us the NUT version?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

@NW4FUN. (OP)

Please can you get the pkg info as requested by pmhausen.