Page 1 of 2

Apply Config will not restart

Posted: Fri Aug 24, 2012 1:47 am
by qbdrift
Dear Nagios Support Team,

we have an issue with the Verification of the Configuration. If we want to Apply the Configuration we run into the following error:

Applying Configuration

Command submitted for processing...
Waiting for configuration verification...............
Nagios restart command failed.

An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.


The Write Config Tool can't find any Errors.

And I have been already through this documentation:
http://support.nagios.com/wiki/index.ph ... n_Problems

Please find attached our Nagios profile.txt and the created cmd.txt and reconfig.txt. If you need further information, please contact us.

Thank you very much for your help!

Best regards,

Heiko Bornemann

Re: Apply Config will not restart

Posted: Fri Aug 24, 2012 9:38 am
by scottwilkerson
Can you run the following from the command line

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
I am thinking that somehow the pid file is missing or maybe we have multiple copies of Nagios running.

Re: Apply Config will not restart

Posted: Mon Sep 03, 2012 8:08 am
by qbdrift
Hi,

I am sorry for the late reply.

And I am sorry, but your solution did not work unfortunatly.

the command "killall -9 nagios" couldn't find any processes.

Any other ideas?

Thanks!

Heiko

Re: Apply Config will not restart

Posted: Tue Sep 04, 2012 10:51 am
by mguthrie
You're running XI on Fedora 15, which is not a supported platform for Nagios XI. Here's your problem:

System Profile:
Fedora release 15 (Lovelock)
Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Failed to issue method call: Access denied
Restarting nagios (via systemctl): [FAILED]
OUTPUT=Restarting nagios (via systemctl): [FAILED]
RETURNCODE=6
systemctl is preventing the restart command from working.

Re: Apply Config will not restart

Posted: Wed Sep 05, 2012 4:56 am
by qbdrift
Thanks for the replay.

But than I have one more question, please.

Why can I restart nagios than, if I am using "Tools -> Write Config Files" in the Nagios Core Config Manager?

Re: Apply Config will not restart

Posted: Wed Sep 05, 2012 5:15 am
by qbdrift
And why is it not supported?

In your System Requirements Fedora is listed.

It would be great, if you could help me.

Thanks!

Re: Apply Config will not restart

Posted: Wed Sep 05, 2012 8:56 am
by lmiltchev
Could you, please, show us where did you see Fedora listed as "supported" OS? It is not supported and we must rectify this if we made a mistake. Here's what we have on our wiki page and on the Administrators Guide:

http://support.nagios.com/wiki/index.ph ... tributions

http://assets.nagios.com/downloads/nagi ... quirements

Did you look at some other place? Can you provide a URL?

Re: Apply Config will not restart

Posted: Thu Sep 06, 2012 4:13 am
by qbdrift
I found it in your pdf file.

Here: http://assets.nagios.com/datasheets/nag ... atures.pdf

On the last page is a System Requirements box.

Everything is working fine, only this "Apply Configuration" button is not.

Re: Apply Config will not restart

Posted: Thu Sep 06, 2012 9:30 am
by lmiltchev
This document hasn't been updated for a while... We will have to go over it... Regarding the Apply Configuration, our script uses:

Code: Select all

/etc/init.d/nagios restart
It seems like, for some reason, this gets "passed" to systemctl in Fedora 15. We will have to do some digging... Check what you have in the sudoers file - a simple edit may resolve your issue.

Re: Apply Config will not restart

Posted: Fri Sep 07, 2012 5:17 am
by qbdrift
Here is the content from the sudoers file.

What needs to be changed, please?

# PNP
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/nmap *