OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: NW4FUN on March 19, 2022, 05:35:49 PM

Title: NUT is driving me NUTS!!!
Post by: NW4FUN on March 19, 2022, 05:35:49 PM
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???

:-[
Title: Re: NUT is driving me NUTS!!!
Post by: aimdev on March 19, 2022, 07:27:49 PM
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?
Title: Re: NUT is driving me NUTS!!!
Post by: 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.

Title: Re: NUT is driving me NUTS!!!
Post by: Patrick M. Hausen on March 19, 2022, 09:17:58 PM
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
Title: Re: NUT is driving me NUTS!!!
Post by: aimdev on March 20, 2022, 07:08:47 AM
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.


Title: Re: NUT is driving me NUTS!!!
Post by: aimdev on March 28, 2022, 07:55:07 PM
It would benefit the community if you could inform us if you resolved the issue, including what you did to achieve success.

Title: Re: NUT is driving me NUTS!!!
Post by: NW4FUN on March 30, 2022, 04:49:39 PM
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.
Title: Re: NUT is driving me NUTS!!!
Post by: aimdev on March 30, 2022, 05:41:41 PM
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

Title: Re: NUT is driving me NUTS!!!
Post by: Patrick M. Hausen 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.
Title: Re: NUT is driving me NUTS!!!
Post by: aimdev on March 30, 2022, 06:49:20 PM
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.
Title: Re: NUT is driving me NUTS!!!
Post by: Patrick M. Hausen on March 30, 2022, 11:23:07 PM
Can't you just please do a pkg info on your OPNsense and tell us the NUT version?
Title: Re: NUT is driving me NUTS!!!
Post by: aimdev on March 31, 2022, 07:11:49 AM
@NW4FUN. (OP)

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