OPNsense Forum

English Forums => General Discussion => Topic started by: eblot on May 08, 2019, 09:35:27 am

Title: Did 19.1.7 break NUT support?
Post by: eblot on May 08, 2019, 09:35:27 am
Hi,

After upgrading to 19.1.7, the UPS (NUT) monitoring on my amd64-based OPNsense installation broke.

The UPS can no longer be contacted. I tried the usual stuff: unplug/plug back USB connection to the UPS, then uninstall/reinstall the NUT plugin, w/o luck.

I should say that I understand little-to-none on how NUT works and even less, if possible, about the NUT plugin and its UI in OPNsense. I've installed it quite a long time ago and I kind of forgot what I actually did to make it work by that time. I should have written it down.

Anyway the UPS is not an exotic model (EATON Ellipse)
The log file reports (since I plug-cycled the UPS):

   kernel: ugen0.5: <EATON Ellipse ECO> at usbus0 (disconnected)
   kernel: ugen0.5: <EATON Ellipse ECO> at usbus0
   upsmon[55902]: UPS [ups]: connect failed: Connection failure: Operation timed out
   upsmon[55902]: UPS ups is unavailable
   upsmon[55902]: UPS [ups]: connect failed: Connection failure: Operation timed out
   ...


The dashboard shows 2 NUT related services: nut_upsmon (reported as working, green status) and nut_daemon (reported as failed, red status).

The NUT configuration shows the USBHID driver is enabled, but the UPS Status in the Diagnostic pane is always empty, so it is hard to tell what is actually going wrong.

I have not change the configuration (as it used to work even with previous 19.1.6) since I've upgraded to the very latest OPNsense release.

Note that uninstalling/re-installing the NUT plugin reported a slight difference:


  May 7 23:03:42   pkg: os-nut-devel-1.4 deinstalled
  May 7 23:04:26   pkg: os-nut-1.4 installed


Any idea of what went wrong, and most importantly where to start to trouble shoot this issue?
 
Thanks.
Title: Re: Did 19.1.7 break NUT support?
Post by: mimugmail on May 08, 2019, 12:58:19 pm
Did you play with development version?
Title: Re: Did 19.1.7 break NUT support?
Post by: eblot on May 08, 2019, 01:01:05 pm
I do not exactly remember what I did when I installed NUT (dev version) for the first time, maybe one year ago or so.
I think I did edit some configuration to make it work by that time.

Should I remove all the files manually?
Title: Re: Did 19.1.7 break NUT support?
Post by: franco on May 09, 2019, 09:07:53 am
I don't think anything changed there for a while so it could be a local issue entirely. Do a health check from the firmware page to make sure that no files are damaged that would cause this.


Cheers,
Franco
Title: Re: Did 19.1.7 break NUT support?
Post by: chienchou.pan on May 09, 2019, 10:59:41 am
I have the same problem!!

my opnsense version is 19.1.7 production

Title: Re: Did 19.1.7 break NUT support?
Post by: mimugmail on May 09, 2019, 11:16:28 am
I have the same problem!!

my opnsense version is 19.1.7 production

And you updated from 19.1.6?
Title: Re: Did 19.1.7 break NUT support?
Post by: eblot on May 09, 2019, 11:20:39 am
I don't think anything changed there for a while so it could be a local issue entirely. Do a health check from the firmware page to make sure that no files are damaged that would cause this.

I'm not actually sure how to do that. Is it the "System/Firmware/Reporter" page? It shows

   Luckily we have not detected a programming bug.

but if I click on "Report an issue", it shows

   Unfortunately we have detected at least one programming bug.

   Would you like to submit this crash report to the developers?

I'm not sure if it is a template message for reporting a bug, or if there is an actual issue here. I never been to this page before.
Title: Re: Did 19.1.7 break NUT support?
Post by: chienchou.pan on May 09, 2019, 11:31:13 am
I have two devices both 19.1.7.
one was  updated from 19.1.6, and the other one was updated from 19.1.




Title: Re: Did 19.1.7 break NUT support?
Post by: mimugmail on May 09, 2019, 04:14:39 pm
I have two devices both 19.1.7.
one was  updated from 19.1.6, and the other one was updated from 19.1.

Both are connected via serial/usb to the UPS?
Title: Re: Did 19.1.7 break NUT support?
Post by: chienchou.pan on May 10, 2019, 02:57:29 am
I have two devices both 19.1.7.
one was  updated from 19.1.6, and the other one was updated from 19.1.

Both are connected via serial/usb to the UPS?

yes, both are connected via usb to the UPS.

my configuration is like below

General Settings

 Enable Nut (click)
Service Mode => standalone
Name => APC
Listen Address => 127.0.0.1, ::1

USB Type
APCsmart-driver enable (port=auto)

the log is like below

May 9 16:19:21   upsmon[82631]: UPS [APC]: connect failed: Connection failure: Operation timed out
May 9 16:18:01   upsmon[82631]: UPS [APC]: connect failed: Connection failure: Operation timed out
May 9 16:16:41   upsmon[82631]: UPS [APC]: connect failed: Connection failure: Operation timed out
May 9 16:15:21   upsmon[82631]: UPS APC is unavailable
May 9 16:15:21   upsmon[82631]: UPS [APC]: connect failed: Connection failure: Operation timed out
May 9 16:14:01   upsmon[82631]: Communications with UPS APC lost
May 9 16:14:01   upsmon[82631]: UPS [APC]: connect failed: Connection failure: Operation timed out
May 9 16:13:12   root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
May 9 16:12:45   upsmon[50193]: Startup successful





Title: Re: Did 19.1.7 break NUT support?
Post by: mimugmail on May 10, 2019, 05:50:33 am
And usbhid same error?
Title: Re: Did 19.1.7 break NUT support?
Post by: chienchou.pan on May 10, 2019, 07:36:28 am
And usbhid same error?

when I changed to usbhid, it's OK!!
So we can't use APCsmart-Driver?
Title: Re: Did 19.1.7 break NUT support?
Post by: mimugmail on May 10, 2019, 07:47:25 am
I'd guess not every APC UPS supports the apcsmart driver. The whole nut-tools software is quite a mess, so I'd rather be happy if it just works :)
Title: Re: Did 19.1.7 break NUT support?
Post by: chienchou.pan on May 10, 2019, 08:04:26 am
I'd guess not every APC UPS supports the apcsmart driver. The whole nut-tools software is quite a mess, so I'd rather be happy if it just works :)

Thanks a lot.

And I have another question, Can we setup the parameter with Nut by ourself to control the opnsense shutdown when lost power in the future?
Title: Re: Did 19.1.7 break NUT support?
Post by: eblot on May 10, 2019, 11:10:22 pm
I'd guess not every APC UPS supports the apcsmart driver. The whole nut-tools software is quite a mess, so I'd rather be happy if it just works :)
You were right. For some reason, both the USBHID and the APCSMART drivers got enabled.
Disabling the APCSMART driver and reloading the service just made it.

Thanks!