The "systemctl start nagios.service" command works fine, and Nagios runs fine when it starts.
The problem is that "systemctl stop nagios.service" and "systemctl restart nagios.service" don't do anything.
It appears to correctly execute the command, but the service doesn't stop or restart.
I've checked through a lot of posts that I could find on issues with systemctl (because this is not a native service in CentOS/RedHat 7.x), but none of the suggestions have solved my problem. I was hoping someone here may be able to provide me with a solution.
Based on what I've found so far, here is the configuration for the service:
Code: Select all
[root@dal10-build-Nagios system]# find / -name nagios\*service -print
/etc/systemd/system/multi-user.target.wants/nagios.service
/etc/systemd/system/nagios.service
/sys/fs/cgroup/systemd/system.slice/nagios.service
Code: Select all
[root@dal10-build-Nagios system]# ls -l /etc/systemd/system/multi-user.target.wants/nagios.service /etc/systemd/system/nagios.service /sys/fs/cgroup/systemd/system.slice/nagios.service
lrwxrwxrwx 1 root root 34 Jan 9 09:01 /etc/systemd/system/multi-user.target.wants/nagios.service -> /etc/systemd/system/nagios.service
-rw-r--r-- 1 root root 729 Jan 9 09:01 /etc/systemd/system/nagios.service
/sys/fs/cgroup/systemd/system.slice/nagios.service:
total 0
-rw-r--r-- 1 root root 0 Jan 9 10:34 cgroup.clone_children
--w--w--w- 1 root root 0 Jan 9 10:34 cgroup.event_control
-rw-r--r-- 1 root root 0 Jan 9 10:34 cgroup.procs
-rw-r--r-- 1 root root 0 Jan 9 10:34 notify_on_release
-rw-r--r-- 1 root root 0 Jan 9 10:34 tasks
Code: Select all
[root@dal10-build-Nagios system]# cat /etc/systemd/system/nagios.service
# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/nagios
Description=LSB: Starts and stops the Nagios monitoring server
Before=runlevel2.target
Before=runlevel3.target
Before=runlevel4.target
Before=runlevel5.target
Before=shutdown.target
After=network-online.target
After=network-online.target
After=nrpe.service
Wants=network-online.target
Conflicts=shutdown.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/rc.d/init.d/nagios start
ExecStop=/etc/rc.d/init.d/nagios stop
ExecReload=/etc/rc.d/init.d/nagios reload
[Install]
WantedBy=multi-user.target
[root@dal10-build-Nagios system]# systemctl list-unit-files | grep nagios
nagios.service enabled
[root@dal10-build-Nagios system]# ls -l /etc/rc.d/init.d/nagios
-rwxr-xr-x 1 root root 8243 Jan 11 13:41 /etc/rc.d/init.d/nagios
[root@dal10-build-Nagios system]#