service nagios start failed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
ransecurity
Posts: 3
Joined: Thu Mar 31, 2016 3:35 pm

Re: service nagios start failed

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: service nagios start failed

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
wheniturninto
Posts: 1
Joined: Thu Jun 09, 2016 5:48 am

Re: service nagios start failed

Post 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".
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: service nagios start failed

Post by rkennedy »

Thanks @wheniturninto

@ransecurity - let us know if you have any further questions.
Former Nagios Employee
Locked