https://assets.nagios.com/downloads/nag ... entos7.pdf
Everything has gone fine but when I try to start the Nagios service using the command
Code: Select all
sudo service nagios start
Starting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[FAILED]
systemctl status nagios.service INFO
● nagios.service - Nagios Core Monitoring Daemon
Loaded: loaded (/etc/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2019-10-13 01:20:42 ACDT; 6s ago
Process: 63865 ExecStart=/usr/lib/systemd/scripts/nagios start (code=exited, status=203/EXEC)
Oct 13 01:20:42 localhost.localdomain systemd[1]: Starting Nagios Core Monitoring Daemon...
Oct 13 01:20:42 localhost.localdomain systemd[1]: nagios.service: control process exited, code=exited status=203
Oct 13 01:20:42 localhost.localdomain systemd[1]: Failed to start Nagios Core Monitoring Daemon.
Oct 13 01:20:42 localhost.localdomain systemd[1]: Unit nagios.service entered failed state.
Oct 13 01:20:42 localhost.localdomain systemd[1]: nagios.service failed.
Warning: nagios.service changed on disk. Run 'systemctl daemon-reload' to reload units.
journalctl -xe INFO
Oct 13 01:20:42 localhost.localdomain sudo[63843]: karl : TTY=pts/0 ; PWD=/tmp/nagios-plugins-2.1.1 ; USER=root ; COMMAND=/sbin/service nagios start
Oct 13 01:20:42 localhost.localdomain sudo[63843]: pam_unix(sudo:session): session opened for user root by karl(uid=0)
Oct 13 01:20:42 localhost.localdomain polkitd[707]: Registered Authentication Agent for unix-process:63859:961913 (system bus name :1.161 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/
Oct 13 01:20:42 localhost.localdomain systemd[1]: Starting Nagios Core Monitoring Daemon...
-- Subject: Unit nagios.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios.service has begun starting up.
Oct 13 01:20:42 localhost.localdomain systemd[63865]: Failed at step EXEC spawning /usr/lib/systemd/scripts/nagios: No such file or directory
-- Subject: Process /usr/lib/systemd/scripts/nagios could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- The process /usr/lib/systemd/scripts/nagios could not be executed and failed.
--
-- The error number returned by this process is 2.
Oct 13 01:20:42 localhost.localdomain systemd[1]: nagios.service: control process exited, code=exited status=203
Oct 13 01:20:42 localhost.localdomain systemd[1]: Failed to start Nagios Core Monitoring Daemon.
-- Subject: Unit nagios.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios.service has failed.
--
-- The result is failed.
Oct 13 01:20:42 localhost.localdomain systemd[1]: Unit nagios.service entered failed state.
Oct 13 01:20:42 localhost.localdomain systemd[1]: nagios.service failed.
Oct 13 01:20:42 localhost.localdomain polkitd[707]: Unregistered Authentication Agent for unix-process:63859:961913 (system bus name :1.161, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, l
Oct 13 01:20:42 localhost.localdomain sudo[63843]: pam_unix(sudo:session): session closed for user root
I also created a file /etc/systemd/system/nagios.service as per some recommendations from ohter discussions as I was previously getting a error code 1 before.
nagios.service INFO
Code: Select all
[Unit]
Description=Nagios Core Monitoring Daemon
After=network.target
[Service]
User=nagios
Group=nagios
Type=forking
ExecStart=/usr/lib/systemd/scripts/nagios start
ExecStop=/usr/lib/systemd/scripts/nagios stop
ExecReload=/usr/lib/systemd/scripts/nagios reload
[Install]
WantedBy=multi-user.target
Any help would be greatly appreciated