Page 2 of 2

Re: service nagios start failed

Posted: Fri Apr 01, 2016 12:06 pm
by ransecurity
jolson wrote:You need to make a script in the following directory:
/etc/systemd/system/

For example, you might first use vim to create the file:

Code: Select all

vim /etc/systemd/system/nagios.service
Insert the following text into that service:

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
Once generated, you should be capable of calling it via systemctl:

Code: Select all

systemctl stop nagios

Code: Select all

systemctl start nagios
Sorry, still getting the same error after doing that. (Job for nagios.service failed because a timeout was exceeded...) and after typing "systemctl status nagios.service" I get the same than what's said before (Failed to start LSB: start and stop Nagios monitoring server.)
I'm using Fedora 23. Any other suggestion will be highly appreciated.
Thanks in advance.

Re: service nagios start failed

Posted: Fri Apr 01, 2016 1:43 pm
by lmiltchev
Try installing Nagios Core 4.1.1 (or at least 4.0.4). This was a bug, that was fixed in 4.0.4.

https://tracker.nagios.org/view.php?id=558

Re: service nagios start failed

Posted: Thu Jun 09, 2016 5:55 am
by wheniturninto
I had the same error with exit code 8 and i figured out that i had mispelled a "define command", i had written "commadn" instead of "command". Then i managed to "sudo service nagios restart".

Re: service nagios start failed

Posted: Thu Jun 09, 2016 10:34 am
by rkennedy
Thanks @wheniturninto

@ransecurity - let us know if you have any further questions.