[Nut-upsuser] Fedora 40 nut-server not starting at boot
Bill Gee
bgee at campercaver.net
Sun Jul 28 22:33:25 BST 2024
No luck. I modified both /usr/lib/systemd/system/nut.target and
/usr/lib/systemd/nut-server.target The behavior did not change.
Looking at it a bit more, I noticed a comment in
/usr/lib/systemd/system/nut-server.service to the effect that the
network does not need to be running - merely present - when nut starts.
If a running network is wanted, then a new file needs to be added.
I created /etc/systemd/system/nut-server.service.d/network.conf with
these three lines:
[Unit]
Requires=network-online.target
After=network-online.target
I ran "systemctl daemon-reload" and rebooted. Still no luck.
nut-server did not start during the boot. It starts with no problems
when run from a command line:
========================
[root at mythtv ~]# systemctl status nut-server
○ nut-server.service - Network UPS Tools - power devices information server
Loaded: loaded (/usr/lib/systemd/system/nut-server.service;
enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
/etc/systemd/system/nut-server.service.d
└─environ.conf, network.conf
Active: inactive (dead)
[root at mythtv ~]# systemctl start nut-server
[root at mythtv ~]# systemctl status nut-server
● nut-server.service - Network UPS Tools - power devices information server
Loaded: loaded (/usr/lib/systemd/system/nut-server.service;
enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
/etc/systemd/system/nut-server.service.d
└─environ.conf, network.conf
Active: active (running) since Sun 2024-07-28 16:26:42 CDT; 2s ago
Process: 1703 ExecStartPre=/usr/bin/systemd-tmpfiles --create
/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf (code=ex>
Process: 1706 ExecStartPost=/bin/grep -E Units|Max open files
/proc/${MAINPID}/limits (code=exited, status=0/SUCCES>
Main PID: 1705 (upsd)
Tasks: 1 (limit: 9460)
Memory: 944.0K (peak: 2.9M)
CPU: 27ms
CGroup: /system.slice/nut-server.service
└─1705 /usr/sbin/upsd -F
======================================
===============
Bill Gee
On 7/28/24 13:53, Tim Dawson wrote:
> Wants=network.target network-online.target
> After=network.target network-online.target
>
> Seems to be the case on RedHat8, and other RedHat based distros should
> match.
>
>
> On July 28, 2024 1:56:49 PM EDT, Bill Gee <bgee at campercaver.net> wrote:
>
> These files came from the distro package. I did not change anything
> myself. Systemd newbie here ...
>
> So the detailed question is - Exactly what change is needed to add
> the network-target dependency? I suspect it is not enough to simply
> remove the comment symbol on those two lines.
> ------------------------------------------------------------------------
> Bill Gee
>
> On 7/28/24 10:10, Tim Dawson wrote:
>
> Seems like you would also want the "network-target" dependency,
> since nut will likelynfail without networking being up. (This
> would also explwin why the sysctl start ... works after boot,
> but not during . . .
>
>
> On July 28, 2024 10:37:15 AM EDT, Bill Gee
> <bgee at campercaver.net> wrote:
>
> I have also been having this problem. Checking a few of the files
More information about the Nut-upsuser
mailing list