I've had fun with nut on RH systems, these are my notes to get it working: Create /usr/lib/tmpfiles.d/nut-client.conf:D /run/nut 0770 root nut -
...the file did not exist, and so the PID folder/file was not getting generated. Then the driver would start. Also had to setup enabled services (still not 100% confident that this is totally correct):[root@emp80 ups]# systemctl list-unit-files | grep -i nut nut-driver-enumerator.path disabled nut-driver-enumerator.service disabled [email protected] disabled nut-monitor.service disabled nut-server.service disabled nut-driver.target enabled nut.target enabled I made no changes to unit files. Result: [root@emp90 ~]# systemctl list-units | grep nut [email protected] loaded active running Network UPS Tools - device driver for eaton5sx nut-monitor.service loaded active running Network UPS Tools - power device monitor and shutdown controller nut-server.service loaded active running Network UPS Tools - power devices information server system-nut\x2ddriver.slice loaded active active Slice /system/nut-driver nut-driver.target loaded active active Network UPS Tools - target for power device drivers on this system nut.target loaded active active Network UPS Tools - target for power device drivers, data server and monitoring client (if enabled) on this system Simon On Monday, July 29, 2024 07:52 AEST, Tim Dawson <[email protected]> wrote: Look in the startup logs and see where itnis starting. I'm not at a RH system at the moment, but at work, I have had to do this, so can look there,mor perhaps put Nut on the test RH8 VM I spun up for other rrasons on Friday and work out the syntax. Not sure if the systemd file you are using came in the RPM or not, but if it did, it's almost a crime that this critical detail was overlooked. On July 28, 2024 5:33:25 PM EDT, Bill Gee <[email protected]> wrote: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@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@mythtv ~]# systemctl start nut-server [root@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 <[email protected]> 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 <[email protected]> wrote: I have also been having this problem. Checking a few of the files ______________________________________________________________________________ Nut-upsuser mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- Simon Wilson M: 0400 121 116
_______________________________________________ Nut-upsuser mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
