[Nut-upsuser] NUT stopped working after an upgrade

Bill Gee bgee at campercaver.net
Sun Nov 10 12:42:01 GMT 2024


Hi Tim -

That means the udev rule is not working.  Here is what I see on the 
system.  I changed the permissions on hidraw6 to 664, but the nut-driver 
service still does not start.

===================
[root at mythtv ~]# ll /dev/hid*
crw------- 1 root root 241, 0 Nov  9 08:21 /dev/hidraw0
crw------- 1 root root 241, 1 Nov  9 08:21 /dev/hidraw1
crw------- 1 root root 241, 2 Nov  9 08:21 /dev/hidraw2
crw------- 1 root root 241, 3 Nov  9 08:21 /dev/hidraw3
crw------- 1 root root 241, 4 Nov  9 08:21 /dev/hidraw4
crw------- 1 root root 241, 5 Nov  9 08:21 /dev/hidraw5
crw------- 1 root root 241, 6 Nov  9 08:21 /dev/hidraw6

[root at mythtv rules.d]# grep 0764 62-nut-usbups.rules
ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="dialout"
ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="dialout"
ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="664", GROUP="dialout"

[root at mythtv rules.d]# grep dialout /etc/group
dialout:x:18:lirc,nut
====================


===============
Bill Gee

On 11/9/24 19:09, Tim Dawson wrote:
> Check /dev/hidraw6, as noted in your dmesg output (and any other *hid* 
> devices under /dev). User nut has almost zero privs to devices unless a 
> udev rule changes the perms on the dev for nut . . .
> 
> 
> On November 9, 2024 1:25:29 PM EST, Bill Gee <bgee at campercaver.net> wrote:
> 
>     Nut should be running as user nut. As far as I can tell, the udev
>     rules have not changed. And the system IS seeing the UPS at a low level.
> 
>     I looked through /dev/ but did not see a device that jumps out as
>     the UPS.
>     ------------------------------------------------------------------------
>     [root at mythtv rules.d]# dmesg | grep -i 0764
>     [ 2.021485] usb 1-1.8: New USB device found, idVendor=0764,
>     idProduct=0501, bcdDevice= 0.01
>     [ 2.049515] hid-generic 0003:0764:0501.0007: hiddev98,hidraw6: USB
>     HID v1.10 Device [CPS UPS CP1000AVRLCD] on usb-0000:00:1d.0-1.8/input0
>     [root at mythtv rules.d]#
> 
>     [root at mythtv rules.d]# ll 62*
>     -rw-r--r-- 1 root root 4541 Jan 23 2024 62-multipath.rules
>     -rw-r--r-- 1 root root 184 Apr 2 2024 62-nut-ipmipsu.rules
>     -rw-r--r-- 1 root root 15921 Apr 2 2024 62-nut-usbups.rules
>     [root at mythtv rules.d]#
> 
>     [root at mythtv ups]# lsusb
>     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>     Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate
>     Matching Hub
>     Bus 001 Device 003: ID 05af:0408 Jing-Mold Enterprise Co., Ltd 2.4G
>     USB RF KeyBoard
>     Bus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
>     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>     Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate
>     Matching Hub
>     Bus 002 Device 003: ID 058f:6364 Alcor Micro Corp. AU6477 Card
>     Reader Controller
>     Bus 002 Device 004: ID 0c45:7663 Microdia USB Keyboard
> 
>     [root at mythtv system]# ps -U nut
>     PID TTY TIME CMD
>     1255 ? 00:00:00 upsd
>     1280 ? 00:00:00 upsmon
>     [root at mythtv system]#
>     ------------------------------------------------------------------------
>     Looking through /var/log/messages, I see this issued once per minute:
>     ------------------------------------------------------------------------
>     Nov 9 12:18:00 mythtv nut-monitor[1280]: Poll UPS
>     [cyberpower at localhost] failed - Driver not connected
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18885]: Network UPS
>     Tools - Generic HID driver 0.53 (2.8.2)
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18885]: USB
>     communication driver (libusb 1.0) 0.47
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18885]: libusb1: Could
>     not open any HID devices: insufficient permissions on everything
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18885]: No matching HID
>     UPS found
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18885]: upsnotify:
>     failed to notify about state 4: no notification tech defined, will
>     not spam more about it
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18861]: Driver failed to
>     start (exit status=1)
>     Nov 9 12:18:00 mythtv nut-driver at cyberpower[18861]: Network UPS
>     Tools - UPS driver controller 2.8.2
>     Nov 9 12:18:00 mythtv systemd[1]: nut-driver at cyberpower.service:
>     Control process exited, code=exited, status=1/FAILURE
>     Nov 9 12:18:00 mythtv systemd[1]: nut-driver at cyberpower.service:
>     Failed with result 'exit-code'.
>     Nov 9 12:18:00 mythtv systemd[1]: Failed to start nut-
>     driver at cyberpower.service - Network UPS Tools - device driver for
>     NUT device 'cyberpower'.
>     Nov 9 12:18:05 mythtv nut-monitor[1280]: Poll UPS
>     [cyberpower at localhost] failed - Driver not connected
>     ------------------------------------------------------------------------
>     Bill Gee
> 
>     On 11/9/24 11:12, Tim Dawson wrote:
> 
>         Did the upgrade by chance install/alter any udev rules causing
>         the UPS devices to now have incorrect permissions? And what user
>         is nut running as?
> 
> 
>         On November 9, 2024 9:58:57 AM EST, Bill Gee
>         <bgee at campercaver.net> wrote:
> 
>         Running NUT version 2.8.2 on Fedora 40. NUT installed from the
>         Fedora package. CyberPower CP1000AVRLCD connected by USB.
> 
>         I updated the system yesterday with all the latest Fedora packages.
>         Now NUT will not run. Chasing the issue through the layers, I come
>         to this:
>         ------------------------------------------------------------------------
>         [root at mythtv rules.d]# upsc cyberpower
>         Error: Driver not connected
> 
>         [root at mythtv rules.d]# upsdrvctl start
>         Network UPS Tools - UPS driver controller 2.8.2
>         Network UPS Tools - Generic HID driver 0.53 (2.8.2)
>         USB communication driver (libusb 1.0) 0.47
>         libusb1: Could not open any HID devices: insufficient permissions on
>         everything
>         No matching HID UPS found
>         upsnotify: failed to notify about state 4: no notification tech
>         defined, will not spam more about it
>         Driver failed to start (exit status=1)
> 
>         [root at mythtv ~]# nut-scanner
>         Cannot load USB library (libusb-1.0.so) : file not found. USB search
>         disabled.
>         Cannot load SNMP library (libnetsnmp.so) : file not found. SNMP
>         search disabled.
>         Cannot load XML library (libneon.so) : file not found. XML search
>         disabled.
>         Cannot load AVAHI library (libavahi-client.so) : file not found.
>         AVAHI search disabled.
>         Cannot load IPMI library (libfreeipmi.so) : file not found. IPMI
>         search disabled.
>         Cannot load NUT library (libupsclient.so) : file not found. NUT
>         search disabled.
>         No start IP, skipping NUT bus (old connect method)
>         Scanning NUT simulation devices.
> 
>         [root at mythtv ~]# cd /usr/lib64
>         [root at mythtv lib64]# ll libusb*
>         lrwxrwxrwx 1 root root 19 Jan 24 2024 libusb-0.1.so.4 ->
>         libusb-0.1.so.4.4.4
>         -rwxr-xr-x 1 root root 28224 Jan 24 2024 libusb-0.1.so.4.4.4
>         lrwxrwxrwx 1 root root 19 May 7 2024 libusb-1.0.so.0 ->
>         libusb-1.0.so.0.4.0
>         -rwxr-xr-x 1 root root 119760 May 7 2024 libusb-1.0.so.0.4.0
>         lrwxrwxrwx 1 root root 23 Jan 24 2024 libusbmuxd-2.0.so.6 ->
>         libusbmuxd-2.0.so.6.0.0
>         -rwxr-xr-x 1 root root 40736 Jan 24 2024 libusbmuxd-2.0.so.6.0.0
> 
>         The last few lines from "journalctl -u nut-
>         driver at cyberpower.service":
> 
>         Nov 09 08:50:46 mythtv.billgee.local systemd[1]: nut-
>         driver at cyberpower.service: Scheduled restart job, restart counter >
>         Nov 09 08:50:46 mythtv.billgee.local systemd[1]: Starting nut-
>         driver at cyberpower.service - Network UPS Tools - device dr>
>         Nov 09 08:50:46 mythtv.billgee.local nut-driver at cyberpower[4655]:
>         Network UPS Tools - Generic HID driver 0.53 (2.8.2)
>         Nov 09 08:50:46 mythtv.billgee.local nut-driver at cyberpower[4655]:
>         USB communication driver (libusb 1.0) 0.47
>         Nov 09 08:50:46 mythtv.billgee.local nut-driver at cyberpower[4655]:
>         libusb1: Could not open any HID devices: insufficient>
>         Nov 09 08:50:46 mythtv.billgee.local nut-driver at cyberpower[4655]: No
>         matching HID UPS found
>         Nov 09 08:50:46 mythtv.billgee.local nut-driver at cyberpower[4655]:
>         upsnotify: failed to notify about state 4: no notific>
>         Nov 09 08:50:46 mythtv.billgee.local nut-driver at cyberpower[4637]:
>         Driver failed to start (exit status=1)
>         Nov 09 08:50:51 mythtv.billgee.local nut-driver at cyberpower[4657]:
>         Network UPS Tools - Generic HID driver 0.53 (2.8.2)
>         Nov 09 08:50:51 mythtv.billgee.local nut-driver at cyberpower[4657]:
>         USB communication driver (libusb 1.0) 0.47
>         Nov 09 08:50:51 mythtv.billgee.local nut-driver at cyberpower[4657]:
>         libusb1: Could not open any HID devices: insufficient>
>         Nov 09 08:50:51 mythtv.billgee.local nut-driver at cyberpower[4657]: No
>         matching HID UPS found
>         Nov 09 08:50:51 mythtv.billgee.local nut-driver at cyberpower[4657]:
>         upsnotify: failed to notify about state 4: no notific>
>         Nov 09 08:50:51 mythtv.billgee.local nut-driver at cyberpower[4637]:
>         Driver failed to start (exit status=1)
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4659]:
>         Network UPS Tools - Generic HID driver 0.53 (2.8.2)
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4659]:
>         USB communication driver (libusb 1.0) 0.47
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4659]:
>         libusb1: Could not open any HID devices: insufficient>
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4659]: No
>         matching HID UPS found
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4659]:
>         upsnotify: failed to notify about state 4: no notific>
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4637]:
>         Driver failed to start (exit status=1)
>         Nov 09 08:50:56 mythtv.billgee.local nut-driver at cyberpower[4637]:
>         Network UPS Tools - UPS driver controller 2.8.2
>         Nov 09 08:50:56 mythtv.billgee.local systemd[1]: nut-
>         driver at cyberpower.service: Control process exited, code=exited, st>
>         Nov 09 08:50:56 mythtv.billgee.local systemd[1]: nut-
>         driver at cyberpower.service: Failed with result 'exit-code'.
>         Nov 09 08:50:56 mythtv.billgee.local systemd[1]: Failed to start
>         nut-driver at cyberpower.service - Network UPS Tools - de>
>         ------------------------------------------------------------------------
>         nut-scanner is correct! The .so file it is looking for does not
>         exist. What the heck happened to it? Was it ever there? I have
>         no idea.
> 
>         Nut-server.service is running, but complains it cannot connect to
>         anything. I also see messages about "Insufficient permissions on
>         everything".
> 
>         Is this - at base - a problem with USB permissions? Missing .so
>         files? Or something else??
> 
>         Thanks!
> 
>         -- 
>         Sent from my Android device with K-9 Mail. Please excuse my brevity.
>         ------------------------------------------------------------------------
>         Nut-upsuser mailing list
>         Nut-upsuser at alioth-lists.debian.net
>         https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-
>         upsuser <https://alioth-lists.debian.net/cgi-bin/mailman/
>         listinfo/nut-upsuser>
> 
>     ------------------------------------------------------------------------
>     Nut-upsuser mailing list
>     Nut-upsuser at alioth-lists.debian.net
>     https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>     <https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser>
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser




More information about the Nut-upsuser mailing list