Project

General

Profile

Actions

Bug #13432

open

ups driver will not start

Added by Scott Lampert 4 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Nut
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.7.x
Affected Plus Version:
22.05
Affected Architecture:
6100

Description

I cannot get a USB-connected UPS to be recognized unless the nut usb driver is started with the "-u root" option.

Without the option:

$ /usr/local/sbin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)

With the option:
$ /usr/local/sbin/upsdrvctl -u root start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Using subdriver: CyberPower HID 0.4

The service script for nut at /usr/local/etc/rc.d/nut.sh does not include the "-u root" option and so it fails to detect any usb connected ups and simple outputs:

Broadcast Message from root@pfsense
        (no tty) at 15:12 EDT...

UPS UPS_NAME_HERE is unavailable

over and over.


Files

Actions #1

Updated by Kris Phillips 4 months ago

Hello,

I tested and was unable to reproduce this, but I don't have a Cyberpower UPS. It seems this shouldn't be limited to Cyberpower, though, since the driver is the generic usbhid driver. Can you please confirm whether you're running pfSense CE or Plus and what version?

Actions #2

Updated by Kris Phillips 4 months ago

Actually, I tested this with an APC unit just now and the nut package and was able to connect with the generic usbhid driver with an APC UPS I had laying around. It reported normally and required nothing to be manually run as root. See attached screenshot. Tested on pfSense Plus 22.05.

Actions #3

Updated by Scott Lampert 4 months ago

It seems to be the same as this issue: https://redmine.pfsense.org/issues/9849

This was on a completely new install of pfsense. It seems once the ups is detected correctly it no longer needs the “-u root” flag for the driver on further invocations. I would assume this is because the permissions on the /dev/ugenX.X are restricted to root only. When I get an opportunity I will try removing the nut package and reinstalling to see if I can reproduce this again.

Actions #4

Updated by Kris Phillips 3 months ago

Scott Lampert wrote in #note-3:

It seems to be the same as this issue: https://redmine.pfsense.org/issues/9849

This was on a completely new install of pfsense. It seems once the ups is detected correctly it no longer needs the “-u root” flag for the driver on further invocations. I would assume this is because the permissions on the /dev/ugenX.X are restricted to root only. When I get an opportunity I will try removing the nut package and reinstalling to see if I can reproduce this again.

Hello Scott,

Sounds good. Please let us know the results.

Actions #5

Updated by Scott Lampert 3 months ago

I cannot reproduce this after it started working. Even uninstalling and reinstalling the nut package does not seem to set up the conditions to make the error happen. I'm not sure if uninstalling the package also removes the old configuration. If it doesn't, then that would explain why it continues to work. The only other thing I could think to try would be to do a complete fresh install of pfsense, install the nut package, and see if it reproduces this condition. Unfortunately, I'm not in a position to do this currently.

Actions #6

Updated by Travis Erdmann 3 months ago

I also had the same issue after doing a fresh install (and restored config)

Actions

Also available in: Atom PDF