You are not logged in.

#1 2022-05-13 16:52:26

rootpeer
Member
Registered: 2019-04-07
Posts: 31

nut-driver.service missing in 2.8.0-1

Hello, I upgraded nut from 2.7.4-3 to 2.8.0-1 and the nut-driver.service file disappeared.

That leads to the nut driver not starting at boot and me having to manually issue

upsdrvctl start

every time to get nut working.

Has anyone else had this problem?

Offline

#2 2022-05-13 17:43:15

ayekat
Member
Registered: 2011-01-17
Posts: 1,516
Website

Re: nut-driver.service missing in 2.8.0-1

Not using nut myself, but looking at the services provided by the package, you now probably have to start the service for your chosen device (e.g. `nut-driver@myups.service`).


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#3 2022-05-13 18:47:52

rootpeer
Member
Registered: 2019-04-07
Posts: 31

Re: nut-driver.service missing in 2.8.0-1

ayekat wrote:

Not using nut myself, but looking at the services provided by the package, you now probably have to start the service for your chosen device (e.g. `nut-driver@myups.service`).

Thanks for your reply! the nut-driver@myups.service was there before, mainly for UPSs that exhibited issues. Enabling that service for my UPS fixes the problem.

If such a change has occured, I guess the documentation needs updating: https://wiki.archlinux.org/title/Networ … figuration

Offline

#4 2022-05-13 19:03:15

ayekat
Member
Registered: 2011-01-17
Posts: 1,516
Website

Re: nut-driver.service missing in 2.8.0-1

Glad that was it.

That section there tells you about nut-server.service, though. If you look at the revision history, the nut-driver service rename was handled 11 days ago.


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#5 2022-05-17 22:39:29

heidegger
Member
Registered: 2013-04-24
Posts: 58

Re: nut-driver.service missing in 2.8.0-1

I am having a similar issue with the update now requiring the driver to be manually loaded with upsdrvctl upon every reboot.
The wiki for nut indicates that nut-server.service should load the driver automatically (within the upsd configuration section), and so I have never manually started or enabled the nut-driver.service or nut-driver@myups.service.
If we need to enable/start the driver, perhaps the wiki page should be updated to reflect this.
Otherwise, nut-server.service may need to be updated to start the driver automatically using the new nut-driver@myups.service convention.

Offline

#6 2022-06-05 13:53:26

vpont
Member
Registered: 2020-09-29
Posts: 4

Re: nut-driver.service missing in 2.8.0-1

I'm facing the same problem, but I have not been able to make it work by enabling nut-driver@myups.service.

Upon restart this service shows as enabled but it looks as it was never started:

○ nut-driver@upsilon_2000.service - Network UPS Tools - device driver for upsilon_2000
     Loaded: loaded (/usr/lib/systemd/system/nut-driver@.service; enabled; vendor preset: disabled)
     Active: inactive (dead)

Starting the service manually works just fine.
What am I doing wrong? Thank you in advance!

Offline

#7 2022-06-05 16:29:22

RuneArch
Member
Registered: 2022-02-07
Posts: 3

Re: nut-driver.service missing in 2.8.0-1

Interestingly, I've just stumbled onto this problem too.

I've recently added a USB connected APC UPS and configured NUT and it all works fine, first time around.

After a (re)boot, nut-server.service & nut-monitor.service appear "inactive (dead)" with no entries in the journal (which seems strange)

I stumbled around a bit and found:

upsdrvsvcctl resync
upsdrvsvcctl reconfigure

which appears to create the UPS specific service from the nut-driver@.service template:

Dropping old systemd service instance for power device [loungeups] to reconfigure the service unit...
Removing instance: 'nut-driver@loungeups' ...
Removed "/etc/systemd/system/nut-driver.target.wants/nut-driver@loungeups.service".
Failed to reset failed state of unit nut-driver@loungeups.service: Unit nut-driver@loungeups.service not loaded.
Error reading the list of systemd service instances for UPS drivers, or none are defined - after dropping
Adding new systemd service instance for power device [loungeups]...
Created symlink /etc/systemd/system/nut-driver.target.wants/nut-driver@loungeups.service → /usr/lib/systemd/system/nut-driver@.service.
Enabled instance: 'nut-driver@loungeups' for NUT configuration section 'loungeups'
Adding 'Wants'+After dependency for 'loungeups' on 'systemd-udev.service systemd-udev-settle.service'...
OK
OK
Started instance: 'nut-driver@loungeups' for NUT configuration section 'loungeups'
OK
=== The currently defined service instances are:
loungeups
=== The currently defined configurations in '/etc/nut/ups.conf' are:
loungeups
Sun  5 Jun 16:11:52 UTC 2022 : OK: No more changes to reconcile between systemd service instances and device configurations in '/etc/nut/ups.conf'

But then, checking, nothing appears to have been created:

$ systemctl list-unit-files | grep -i nut
nut-driver-enumerator.path                      disabled        disabled
nut-driver-enumerator.service                   enabled         disabled
nut-driver@.service                             indirect        disabled
nut-monitor.service                             enabled         disabled
nut-server.service                              enabled         disabled
nut-driver.target                               disabled        disabled
nut.target                                      disabled        disabled

Although it is there (and dead):

$ sudo systemctl status nut-driver@loungeups
○ nut-driver@loungeups.service - Network UPS Tools - device driver for NUT device 'loungeups'
     Loaded: loaded (/usr/lib/systemd/system/nut-driver@.service; enabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/nut-driver@loungeups.service.d
             └─nut-driver-enumerator-generated-checksum.conf, nut-driver-enumerator-generated.conf
     Active: inactive (dead)

(And is in this same state after rebooting)

I've had a look at the NUT documentation and a few internet searches, but I'm not getting any further either.

In my case, I think I have a gap in my knowledge of systemd, because surely I should be able to see the nut-driver@loungeups.service listed with systemctl... and also see why those services are failing...?

Offline

#8 2022-06-06 07:26:05

RuneArch
Member
Registered: 2022-02-07
Posts: 3

Re: nut-driver.service missing in 2.8.0-1

Just to add, in my case, my APC UPS is already listed in the udev rules that come with the NUT package (/usr/lib/udev/rules.d/62-nut-usbups.rules), so I'm presuming that part is working ok (because I can start the driver after booting).

So, is it a timing / sequence issue between udev and the systemd service(s)?

Offline

#9 2022-06-20 21:25:23

RuneArch
Member
Registered: 2022-02-07
Posts: 3

Re: nut-driver.service missing in 2.8.0-1

Quick update, I think I just needed to enable nut.target and nut-driver.target... trouble is, I changed multiple things, so lost track of what the *real* solution was.

Offline

#10 2022-06-23 07:08:26

vpont
Member
Registered: 2020-09-29
Posts: 4

Re: nut-driver.service missing in 2.8.0-1

RuneArch wrote:

Quick update, I think I just needed to enable nut.target and nut-driver.target... trouble is, I changed multiple things, so lost track of what the *real* solution was.

Thank you for the update, that was actually the solution!
It's required to enable and start: nut-driver@myups.service, nut.target and nut-driver.target

Offline

Board footer

Powered by FluxBB