Page 1 of 2
Deleted Service still showing up
Posted: Fri Jan 16, 2015 9:49 am
by SavaSC
Hello,
I need some help troubleshooting an issue I've had ever since upgrading to v.2014R2.3. Whenever I go to apply configuration I get an error that says "Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/ping_Only.cfg', starting on line 31)". The problem is that service has been removed. It is not listed in CCM and when I look for the config file it is not there. I have deleted the Host / Services Configuration files, but it still is happening.
Any suggestions on what I can try?
Thank you!
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 10:11 am
by tmcdonald
Please run the following and show us the last dozen or so lines of output:
Code: Select all
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 10:21 am
by SavaSC
Here it is:
Code: Select all
Running pre-flight check on configuration data...
Checking objects...
Checked 2571 services.
Checked 277 hosts.
Checked 53 host groups.
Checked 8 service groups.
Checked 31 contacts.
Checked 8 contact groups.
Checked 131 commands.
Checked 29 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 277 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 29 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
>>> /etc/sudoers: syntax error near line 97 <<<
>>> /etc/sudoers: syntax error near line 98 <<<
>>> /etc/sudoers: syntax error near line 100 <<<
>>> /etc/sudoers: syntax error near line 102 <<<
sudo: parse error in /etc/sudoers near line 97
sudo: no valid sudoers sources found, quitting
Thank you.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 10:51 am
by lmiltchev
Make sure you don't have the following line duplicated in "/etc/sudoers" and another file under "/etc/sudoers.d/" directory:
If you have duplicate entries, commend out the offending line.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 10:52 am
by tmcdonald
Just what I thought. In your /etc/sudoers file on the lines mentioned (97,98,100,102) you will likely see the ^M character (^M is technically one character displayed on-screen as two) at the end of the lines. There are a few ways to get rid of it, explained here:
https://www.novell.com/support/kb/doc.php?id=7014821
If you use the second method, make sure to copy the new file back over the old.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 11:24 am
by SavaSC
Thanks tmcdonald and Imiltchev for your responses. I looked at the /etc/sudoers file and it didn't have either inconsistency. I did find the problem, however. Here's what I did to fix it:
1) Admin -> Unconfigured Objects - I noticed that many of the "unconfigured" things listed here didn't actually exist any more.
2) Click the "Clear Unconfigured Objects List" link
3) Re-install the v.2014R2.3 update
Now it is working correctly.
Thank you again for taking a look. It wasn't until I started looking up your suggestions that I found this list.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 11:30 am
by tmcdonald
Interesting. Just out of curiosity, can you run that reconfigure again and show us the output? If it is working now and you did not see anything wrong with the sudoers, I am wondering if re-applying the update fixed it.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 11:49 am
by SavaSC
Code: Select all
Running pre-flight check on configuration data...
Checking objects...
Checked 2572 services.
Checked 277 hosts.
Checked 54 host groups.
Checked 8 service groups.
Checked 31 contacts.
Checked 8 contact groups.
Checked 131 commands.
Checked 29 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 277 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 29 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
I had re-installed the update several times before but it never fixed the issue. Honestly, I didn't check to see if just clearing the Unconfigured Objects List fixed it without the re-install. I'm not sure why I did the re-install right after I cleared the list without checking.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 12:01 pm
by tmcdonald
Well I'm glad it is working at any rate. I don't have a clue why Unconfigured Objects being cleared would affect the apply config in such a way, but I'll bring this up to our developers and see if they can come up with anything.
Re: Deleted Service still showing up
Posted: Fri Jan 16, 2015 12:05 pm
by SavaSC
tmcdonald wrote:Well I'm glad it is working at any rate. I don't have a clue why Unconfigured Objects being cleared would affect the apply config in such a way, but I'll bring this up to our developers and see if they can come up with anything.
Thank you!