Eyal Lebedinsky
2022-Jan-11 09:46 UTC
[Nut-upsuser] ups services not starting at boot time
This started in the last few months. After a boot the ups system is down.
$ sudo systemctl status nut-driver
x nut-driver.service - Network UPS Tools - power device driver controller
Loaded: loaded (/usr/lib/systemd/system/nut-driver.service; static)
Active: failed (Result: exit-code) since Tue 2022-01-11 19:29:19 AEDT;
6min ago
Process: 1579 ExecStartPre=/usr/bin/systemd-tmpfiles --create
/usr/lib/tmpfiles.d/nut-client.conf (code=exited, status=0/SUCCESS)
Process: 1610 ExecStart=/usr/sbin/upsdrvctl start (code=exited,
status=1/FAILURE)
CPU: 30ms
Jan 11 19:29:19 e7.eyal.emu.id.au systemd[1]: Starting Network UPS Tools - power
device driver controller...
Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1612]: Network UPS Tools - Generic
HID driver 0.41 (2.7.4)
Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1612]: USB communication driver 0.33
Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1612]: No matching HID UPS found
Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1610]: Driver failed to start (exit
status=1)
Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1610]: Network UPS Tools - UPS
driver controller 2.7.4
Jan 11 19:29:19 e7.eyal.emu.id.au systemd[1]: nut-driver.service: Control
process exited, code=exited, status=1/FAILURE
Jan 11 19:29:19 e7.eyal.emu.id.au systemd[1]: nut-driver.service: Failed with
result 'exit-code'.
Jan 11 19:29:19 e7.eyal.emu.id.au systemd[1]: Failed to start Network UPS Tools
- power device driver controller.
$ sudo systemctl restart nut-driver
Now it comes up and all is OK.
The UPS is CyberPower BR850ELCD-AU
$ uname -a
Linux e7.eyal.emu.id.au 5.15.12-100.fc34.x86_64 #1 SMP Wed Dec 29 15:21:44 UTC
2021 x86_64 x86_64 x86_64 GNU/Linux
Next time this happens, what information should I collect before restarting the
service manually?
TIA
--
Eyal Lebedinsky (eyal at eyal.emu.id.au)
Steffen Grunewald
2022-Jan-11 10:10 UTC
[Nut-upsuser] ups services not starting at boot time
On Tue, 2022-01-11 at 20:46:43 +1100, Eyal Lebedinsky wrote:> This started in the last few months. After a boot the ups system is down. > $ sudo systemctl restart nut-driver > > Now it comes up and all is OK. > > The UPS is CyberPower BR850ELCD-AUWild guess: usb modeswitch changing the ID of the device? - S
Manuel Wolfshant
2022-Jan-11 10:22 UTC
[Nut-upsuser] ups services not starting at boot time
On 1/11/22 11:46, Eyal Lebedinsky wrote:> Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1612]: Network UPS Tools - > Generic HID driver 0.41 (2.7.4) > Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1612]: USB communication > driver 0.33 > Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1612]: No matching HID UPS > found > Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1610]: Driver failed to > start (exit status=1)Here is your culprit, the UPS is not seen in the moment the driver tries to talk with it. Use a monotonic timer to delay the start of the service by, say, 20 secs or so. https://www.freedesktop.org/software/systemd/man/systemd.timer.html