Page 1 of 1

upgrade to r7 and cannot apply config

Posted: Mon Oct 31, 2011 7:19 pm
by dwatson
Hi

I was previosly on R3 and i upgraded to the latest R7. Since the upgrade, i am unable to "Apply configuration" succesfully now. It fails on Waiting for configuration verification... .
and Backend login to the Core Config Manager failed.

The first lot of errors in the log related to no notification periods and check periods. xi_timeperiod_24x7 is what was being used.
I checked the xi_timeperiod_24x7 and it wasnt active. i had to edit it and then it was active again. This fixed most of the issues.

Some services still didnt have the notificationa dn check periods. i checked the configs via web config and it was selected. I checked the .cfg files via ssh and there were no settings for these periods.
I added these via SSH (hope this was ok)

this fixed the errors when doing the configuration verification.

When i run the apply config now. i get the following errors-
Warning: Duplicate definition found for service 'Port 6 Status' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 109)
Warning: Duplicate definition found for service 'Port 6 Bandwidth' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 93)
Warning: Duplicate definition found for service 'Port 2 Status' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 77)
Warning: Duplicate definition found for service 'Port 2 Bandwidth' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 61)
Warning: Duplicate definition found for service 'Port 1 Status' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 45)
Warning: Duplicate definition found for service 'Port 1 Bandwidth' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 29)
Warning: Duplicate definition found for service 'Ping' on host 'flpckwirtr01' (config file '/usr/local/nagios/etc/services/flpckwirtr01.cfg', starting on line 14)
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Warning: Service 'Ping' on host 'flpcbrartr01' has no check time period defined!
Checked 876 services.
Checking hosts...
Checked 99 hosts.
Checking host groups...
Checked 8 host groups.
Checking service groups...
Checked 2 service groups.
Checking contacts...
Checked 5 contacts.
Checking contact groups...
Checked 4 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 76 commands.
Checking time periods...
Checked 11 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

I have removed this service and host that is failing and its still getting the same error.
I have run the fix permissions also without success.
Let me know what information you require to help further diagnose this issue.

Please help and thanks in advance.

David

Re: upgrade to r7 and cannot apply config

Posted: Tue Nov 01, 2011 11:28 am
by lmiltchev
David,

What script did you run while fixing your permissions? Did you check your configuration from a terminal or from the web interface?
From the Nagios XI Home page go to: Configure->Core Config Manager->Tools->Write Config Files, click on all "Go" buttons and post the output.
Note: Prior to this, you may try to get rid of these duplicate service definitions for host 'flpckwirtr01'.

Re: upgrade to r7 and cannot apply config

Posted: Wed Nov 02, 2011 12:38 am
by dwatson
Hi,
write monitoring data-Write host configurations ...
Configuration file successfully written!

Write service configurations ...
Configuration file successfully written!

Write hostgroups.cfg ...
Configuration file successfully written!
Write servicegroups.cfg ...
Configuration file successfully written!
Write hosttemplates.cfg ...
Configuration file successfully written!
Write servicetemplates.cfg ...
Configuration file successfully written!

write additional data
Write timeperiods.cfg ...
Configuration file successfully written!
Write commands.cfg ...
Configuration file successfully written!
Write contacts.cfg ...
Configuration file successfully written!
Write contactgroups.cfg ...
Configuration file successfully written!
Write contacttemplates.cfg ...
Configuration file successfully written!
Write servicedependencies.cfg ...
Configuration file successfully written!
Write hostdependencies.cfg ...
Configuration file successfully written!
Write serviceescalations.cfg ...
Configuration file successfully written!
Write hostescalations.cfg ...
Configuration file successfully written!
Write serviceextinfo.cfg ...
Configuration file successfully written!
Write hostextinfo.cfg ...
Configuration file successfully written!

check configuration file
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 113)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 114.
Error processing object config files!


Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 113)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 114.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Looking at the error, below is the config for this time period.
define timeperiod {
timeperiod_name xi_timeperiod_24x7
alias Xi time period
}

thanks for your help

Re: upgrade to r7 and cannot apply config

Posted: Wed Nov 02, 2011 12:44 pm
by lmiltchev
Sure, let us know if you have more questions.

Re: upgrade to r7 and cannot apply config

Posted: Wed Nov 02, 2011 5:17 pm
by dwatson
hi, sorry, i am still having an issue as above.

Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 113)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 114.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

is still the error, when i browse to the timeperiods and add a time, it works. But it doesnt save this to the timeperiods.cfg file.

thanks

Re: upgrade to r7 and cannot apply config

Posted: Thu Nov 03, 2011 11:08 am
by lmiltchev
Did you remove all of the duplicate definitions through the Core Config Manager? It doesn't seem you did.

Re: upgrade to r7 and cannot apply config

Posted: Mon Nov 14, 2011 6:57 am
by dwatson
hi, sorry about the delay. yeh still having issues. i removed the duplicate (that wasnt a duplicate) from timeperiods.cfg, not getting an error now when running pre-flight check, but can not apply config in the gui.

fails on
Waiting for configuration verification... .
Backend login to the Core Config Manager failed.


Running pre-flight check on configuration data...

Checking services...
Checked 823 services.
Checking hosts...
Checked 99 hosts.
Checking host groups...
Checked 8 host groups.
Checking service groups...
Checked 2 service groups.
Checking contacts...
Checked 5 contacts.
Checking contact groups...
Checked 4 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 76 commands.
Checking time periods...
Checked 11 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
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


maybe the database is corrupt or something. i am almost at the point where i should restart the config from scratch. any help in the right direction would be greatly appreciated

Re: upgrade to r7 and cannot apply config

Posted: Mon Nov 14, 2011 12:17 pm
by lmiltchev
dwatson,

Go to: Admin->System Config->Reset Security Credentials and click on "Update Credentials".

Next, go to: Configure->Advanced Configuration->Core Config Manager->Config Manager Admin->Manage Config Access and see if you have "nagiosxi" account listed there.

Re: upgrade to r7 and cannot apply config

Posted: Sun Nov 27, 2011 2:00 am
by dwatson
I didnt have any luck, so i have started from scratch.

thanks

Re: upgrade to r7 and cannot apply config

Posted: Tue Nov 29, 2011 10:33 am
by mguthrie
Was this system behind a proxy? If you still run into issues, see the FAQ below:
http://support.nagios.com/wiki/index.ph ... n_Problems