@gregrwm I would suggest a systemctl edit nagios.service to create an override config and comment out the hardening effort lines. See if that helps the service start, if so, add each back in one at a time until you find the offending entry(ies), then a bug report to get the service fixed…
[Unit]
Description=Nagios
After=syslog.target network.target
[Service]
# for details of the additional system hardening configuration please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
ProtectHostname=true
ProtectControlGroups=true
ProtectKernelModules=true
ProtectKernelTunables=true
RestrictRealtime=true
# end of system hardening
Type=simple
User=nagios
Group=nagios
ExecStart=/usr/sbin/nagios /etc/nagios/nagios.cfg
[Install]
WantedBy=multi-user.target
and got this result:
+ systemctl status nagios
? nagios.service - Nagios
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; preset: disabled)
Active: inactive (dead) since Thu 2024-12-12 01:42:09 CST; 8min ago
Duration: 81ms
Invocation: 2e4720089d8c4bb1b65a8b27e0cdb40d
Main PID: 38330 (code=exited, status=0/SUCCESS)
CPU: 201ms
Dec 12 01:42:09 v158 nagios[38329]: Checked 0 host dependencies
Dec 12 01:42:09 v158 nagios[38329]: Checked 5 timeperiods
Dec 12 01:42:09 v158 nagios[38329]: Checking global event handlers...
Dec 12 01:42:09 v158 nagios[38329]: Checking obsessive compulsive processor commands...
Dec 12 01:42:09 v158 nagios[38329]: Checking misc settings...
Dec 12 01:42:09 v158 nagios[38329]: Total Warnings: 0
Dec 12 01:42:09 v158 nagios[38329]: Total Errors: 0
Dec 12 01:42:09 v158 nagios[38329]: Things look okay - No serious problems were detected during the pre-flight check
Dec 12 01:42:09 v158 systemd[1]: Started Network Monitor Nagios.
Dec 12 01:42:09 v158 systemd[1]: nagios.service: Deactivated successfully.
+ systemctl start nagios
+ sleep 3
+ journalctl '-S9 sec ago'
Dec 12 01:50:48 v158 systemd[1]: Started Nagios.
Dec 12 01:50:48 v158 nagios[38483]: Nagios 4.5.4 starting... (PID=38483)
Dec 12 01:50:48 v158 nagios[38483]: Nagios Core 4.5.4
Dec 12 01:50:48 v158 nagios[38483]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Dec 12 01:50:48 v158 nagios[38483]: Copyright (c) 1999-2009 Ethan Galstad
Dec 12 01:50:48 v158 nagios[38483]: Last Modified: 2024-08-14
Dec 12 01:50:48 v158 nagios[38483]: License: GPL
Dec 12 01:50:48 v158 nagios[38483]: Website: https://www.nagios.org
Dec 12 01:50:48 v158 nagios[38483]: Nagios 4.5.4 starting... (PID=38483)
Dec 12 01:50:48 v158 nagios[38483]: Local time is Thu Dec 12 01:50:48 CST 2024
Dec 12 01:50:48 v158 nagios[38483]: qh: Failed to init socket '/var/lib/nagios/rw/nagios.qh'. bind() failed: No such file or directory
Dec 12 01:50:48 v158 nagios[38483]: Error: Failed to initialize query handler. Aborting
Dec 12 01:50:48 v158 nagios[38483]: Local time is Thu Dec 12 01:50:48 CST 2024
Dec 12 01:50:48 v158 nagios[38483]: LOG VERSION: 2.0
Dec 12 01:50:48 v158 nagios[38483]: qh: Failed to init socket '/var/lib/nagios/rw/nagios.qh'. bind() failed: No such file or directory
Dec 12 01:50:48 v158 nagios[38483]: Error: Failed to initialize query handler. Aborting
Dec 12 01:50:48 v158 systemd[1]: nagios.service: Main process exited, code=exited, status=1/FAILURE
Dec 12 01:50:48 v158 systemd[1]: nagios.service: Failed with result 'exit-code'.
Looks like still more packaging difficulty? First google result matching that is an error that was fixed in 2013…Still looking, suggestions welcome…
indeed the reload is handy, but the critical changes are “Type=simple” and the modified “ExecStart”.
So actually the whole solution is to create /var/lib/nagios/rw and chown nagios:nagcmd as you suggested above, and revise /usr/lib/systemd/system/nagios.service, as reported in the bug.