Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Sep 2022 11:18:47 +0200
From:      Andrea Venturoli <ml@netfence.it>
To:        cy@FreeBSD.org
Cc:        freebsd-ports@freebsd.org
Subject:   NUT not starting
Message-ID:  <e34bf6dc-46fe-974e-3ef1-8282bf66a426@netfence.it>

next in thread | raw e-mail | index | archive | help
Hello.

Since a few weeks I have a problem with NUT not starting due to USB 
device permissions; I don't know if it was a FreeBSD upgrade or a NUT 
upgrade that broke this, but this is happening on several different systems.
I *think* it happened around the time I switched to the 2022Q3 branch 
for ports.



> # service nut restart
> nut not running? (check /var/db/nut/upsd.pid).
> Network UPS Tools - UPS driver controller 2.8.0
> Network UPS Tools - Generic HID driver 0.47 (2.8.0)
> USB communication driver (libusb 1.0) 0.43
> interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
> Can't claim USB device [051d:0003]@0/0: Other error
> Driver failed to start (exit status=1)
> /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut

> # usbconfig 
> ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
> ugen0.2: <Logitech USB Optical Mouse> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
> ugen0.3: <Logitech USB Keyboard> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (90mA)
> ugen0.4: <American Power Conversion Smart-UPS1500 FW:UPS 03.5 / ID1015> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (10mA)

> # ls -l /dev/|grep ugen
> lrwxr-xr-x  1 root  wheel        9 Sep 24 10:59 ugen0.1 -> usb/0.1.0
> lrwxr-xr-x  1 root  wheel        9 Sep 24 10:59 ugen0.2 -> usb/0.2.0
> lrwxr-xr-x  1 root  wheel        9 Sep 24 10:59 ugen0.3 -> usb/0.3.0
> lrwxr-xr-x  1 root  wheel        9 Sep 24 10:59 ugen0.4 -> usb/0.4.0

> # ls -l /dev/usb/
> total 0
> crw-------  1 root  operator  0x2d Sep 24 10:59 0.1.0
> crw-------  1 root  operator  0x55 Sep 24 10:59 0.1.1
> crw-------  1 root  operator  0x74 Sep 24 10:59 0.2.0
> crw-------  1 root  operator  0x76 Sep 24 10:59 0.2.1
> crw-------  1 root  operator  0x77 Sep 24 10:59 0.3.0
> crw-------  1 root  operator  0x79 Sep 24 10:59 0.3.1
> crw-------  1 root  operator  0x7a Sep 24 10:59 0.3.2
> crw-rw----  1 root  uucp      0x7d Sep 24 08:25 0.4.0
> crw-------  1 root  operator  0x7f Sep 24 10:59 0.4.1

The only way I was able to solve this is by issuing:
upsdrvctl -u root start
upsdrvctl stop
service nut start

However, I need to manually do this after each reboot.

Any hint?

  bye & Thanks
	av.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e34bf6dc-46fe-974e-3ef1-8282bf66a426>