Error reloading configuration
Error reloading configuration
Hi,
I have issue while applying configuration after deactivating a service and error is as below
Warning: Duplicate definition found for contact 'xi_default_contact' (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 40)
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 41.
Error processing object config files!
Please help me out on this issue, we are using Nagios XI 2011R3.2 version.
I have issue while applying configuration after deactivating a service and error is as below
Warning: Duplicate definition found for contact 'xi_default_contact' (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 40)
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 41.
Error processing object config files!
Please help me out on this issue, we are using Nagios XI 2011R3.2 version.
Re: Error reloading configuration
That version of XI is incredibly old. You are probably also running a very old version of Core as well, and it might not be properly validating configs. My primary suggestion is to update to the latest version of XI.
For the time-being though we can take a look at your /usr/local/nagios/etc/contacts.cfg file, just make sure to sanitize any emails or other sensitive information.
For the time-being though we can take a look at your /usr/local/nagios/etc/contacts.cfg file, just make sure to sanitize any emails or other sensitive information.
Former Nagios employee
Re: Error reloading configuration
Hi,
I have PM the file please check.
Mod Edit: Files received and placed on shared drive
I have PM the file please check.
Mod Edit: Files received and placed on shared drive
Re: Error reloading configuration
Code: Select all
define contact {
contact_name xi_default_contact
alias Default Contact
host_notification_period xi_timeperiod_none
service_notification_period xi_timeperiod_none
host_notification_options n
service_notification_options n
host_notification_commands xi_host_notification_handler
service_notification_commands xi_service_notification_handler
email root@localhost
}
EDIT: Files received.
Former Nagios Employee
Re: Error reloading configuration
I have tried applying the post but did not work.
Pmed monitoring configuration Snapshots file to you.
Pmed monitoring configuration Snapshots file to you.
Re: Error reloading configuration
So you went to Configure > Core Config Manger > Contacts and deleted the xi_default_contact contact?
Do it again and/or make sure that it doesn't exist, then run this command:
Then let the tail command run and try to apply configuration again and send us the entire output from the tail command.
Thank you
Do it again and/or make sure that it doesn't exist, then run this command:
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.logThank you
Re: Error reloading configuration
Hi,
I have done as instructed, please find the below output of tail -f /usr/local/nagiosxi/var/cmdsubsys.log command.
Below is the output of Monitoring Configuration Snapshots
PMed Monitoring Configuration Snapshots tar file
I have done as instructed, please find the below output of tail -f /usr/local/nagiosxi/var/cmdsubsys.log command.
Code: Select all
# tail -f /usr/local/nagiosxi/var/cmdsubsys.log
tar: usr/local/nagios/etc/hosts: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
/usr/local/nagiosxi/scripts
RESETTING PERMS
SETUID ROOT OK
OUTPUT=SETUID ROOT OK
RETURNCODE=1
.................................
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
............................................................tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
PROCESSED 0 COMMANDS
2...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosql/index.php
CMDLINE
--2016-08-23 13:20:00-- http://localhost/nagiosql/index.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/admin.php [following]
--2016-08-23 13:20:00-- http://localhost/nagiosql/admin.php
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5286 (5.2K) [text/html]
Saving to: `nagiosql.login'
0K ..... 100% 734M=0s
2016-08-23 13:20:00 (734 MB/s) - `nagiosql.login' saved [5286/5286]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUser name=nagiosxi&tfPassword=sdiiat' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosql/admin/import.php
Array
(
)
RESETTING PERMS
SETUID ROOT OK
URL: http://localhost/nagiosql/index.php
CMDLINE
--2016-08-23 13:20:00-- http://localhost/nagiosql/index.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/admin.php [following]
--2016-08-23 13:20:00-- http://localhost/nagiosql/admin.php
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5286 (5.2K) [text/html]
Saving to: `nagiosql.login'
0K ..... 100% 629M=0s
2016-08-23 13:20:00 (629 MB/s) - `nagiosql.login' saved [5286/5286]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUser name=nagiosxi&tfPassword=sdiiat' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosql/admin/verify.php
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.exp ort.monitoring
--2016-08-23 13:20:00-- http://localhost/nagiosql/admin/verify.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7096 (6.9K) [text/html]
Saving to: `nagiosql.export.monitoring'
0K ...... 100% 702M=0s
2016-08-23 13:20:01 (702 MB/s) - `nagiosql.export.monitoring' saved [7096/7096]
WRITE CONFIGS SUCCESSFUL!
--2016-08-23 13:20:01-- http://localhost/nagiosql/admin/verify.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
200 OK
Length: 7400 (7.2K) [text/html]
Saving to: `nagiosql.export.additional'
0K ....... 100% 799M=0s
2016-08-23 13:20:01 (799 MB/s) - `nagiosql.export.additional' saved [7400/7400]
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeAdditional=Go' -O nagiosql.exp ort.additional
OUTPUT:
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
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' (configfile '/usr/local/nagios/etc/timeperiods.cfg', starting on line 89)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 90.
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.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/scripts
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1471928822.tar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1471928822.tar.gz
tar: usr/local/nagios/etc/static: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/static: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/services: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/services: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp/pages: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp/pages: Cannot change mode to rwxrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp/check_commands: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp/check_commands: Cannot change mode to rwxrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp: Cannot change mode to rwxrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/import: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/import: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/hosts: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/hosts: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
/usr/local/nagiosxi/scripts
RESETTING PERMS
SETUID ROOT OK
OUTPUT=SETUID ROOT OK
RETURNCODE=1
.
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
Code: Select all
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
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 89)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 90.
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.
Re: Error reloading configuration
Go to Configure > Core Config Manager > Time Periods
- Do you have two xi_timeperiod_24x7 entries? If so, delete one of them and try to apply configuration again.
If it still doesn't work, go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
- Without doing any steps in between-please send this file:
Thank you
- Do you have two xi_timeperiod_24x7 entries? If so, delete one of them and try to apply configuration again.
If it still doesn't work, go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
- Without doing any steps in between-please send this file:
Code: Select all
/usr/local/nagios/etc/timeperiods.cfgRe: Error reloading configuration
Hi,ssax wrote:Go to Configure > Core Config Manager > Time Periods
- Do you have two xi_timeperiod_24x7 entries? If so, delete one of them and try to apply configuration again.
If it still doesn't work, go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
- Without doing any steps in between-please send this file:
Thank youCode: Select all
/usr/local/nagios/etc/timeperiods.cfg
I did not find the option delete under Configure > Core Config Manager > Tools > Write Config Files.
But i have disabled all timeperiods except below
24x7---Unable to disbale it
Code: Select all
Entry cannot be activated because it is used by another configuration:
Relational information for 24x7 of table tbl_timeperiod:
Relation to tbl_contacttemplate, entry generic-contact - deletion possible
Relation to tbl_contacttemplate, entry generic-contact - deletion possible
Relation to tbl_hosttemplate, entry linux-server - deletion possible
Relation to tbl_hosttemplate, entry windows-server - deletion possible
Relation to tbl_hosttemplate, entry generic-printer - deletion possible
Relation to tbl_hosttemplate, entry generic-switch - deletion possible
Relation to tbl_hosttemplate, entry generic-host - deletion possible
Relation to tbl_hosttemplate, entry windows-server - deletion possible
Relation to tbl_hosttemplate, entry generic-switch - deletion possible
Relation to tbl_servicetemplate, entry generic-service - deletion possible
Relation to tbl_servicetemplate, entry generic-service - deletion not possible
Code: Select all
Entry cannot be activated because it is used by another configuration:
Relational information for xi_timeperiod_24x7 of table tbl_timeperiod:
Relation to tbl_contacttemplate, entry xi_contact_generic - deletion possible
Relation to tbl_contacttemplate, entry xi_contact_generic - deletion possible
Relation to tbl_host, entry goldengate.teleatlas.com - deletion not possible
Relation to tbl_host, entry www.blomurbex.com - deletion not possible
Relation to tbl_host, entry goldengate.teleatlas.com - deletion not possible
Relation to tbl_host, entry www.blomurbex.com - deletion not possible
Relation to tbl_hosttemplate, entry xiwizard_generic_host - deletion possible
Relation to tbl_hosttemplate, entry xi_host_generic - deletion possible
Relation to tbl_hosttemplate, entry xiwizard_generic_host - deletion possible
Relation to tbl_hosttemplate, entry xi_host_generic - deletion possible
Relation to tbl_service, entry goldengate.teleatlas.com-_WebServices_SoapService URL Status - deletion not possible
Relation to tbl_service, entry www.blomurbex.com-_v02_WMSService URL Status - deletion not possible
Relation to tbl_service, entry www.blomurbex.com-HTTP - deletion not possible
Relation to tbl_service, entry www.blomurbex.com-Ping - deletion not possible
Relation to tbl_service, entry www.blomurbex.com-DNS Resolution - deletion not possible
Relation to tbl_service, entry www.blomurbex.com-DNS IP Match - deletion not possible
Relation to tbl_service, entry goldengate.teleatlas.com-_WebServices_SoapService URL Status - deletion possible
Relation to tbl_service, entry www.blomurbex.com-_v02_WMSService URL Status - deletion possible
Relation to tbl_service, entry www.blomurbex.com-HTTP - deletion possible
Relation to tbl_service, entry www.blomurbex.com-Ping - deletion possible
Relation to tbl_service, entry www.blomurbex.com-DNS Resolution - deletion possible
Relation to tbl_service, entry www.blomurbex.com-DNS IP Match - deletion possible
Relation to tbl_servicetemplate, entry xiwizard_generic_service - deletion possible
Relation to tbl_servicetemplate, entry xi_service_generic - deletion possible
Relation to tbl_servicetemplate, entry xiwizard_generic_service - deletion not possible
Relation to tbl_servicetemplate, entry xi_service_generic - deletion not possible
Code: Select all
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
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 50)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 51.
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.
Re: Error reloading configuration
Please go to Configure > Core Config Manager > Tools > Write Config Files
- Click Write
- Then without doing anything in between, post the contents of your /usr/local/nagios/etc/timeperiods.cfg so that we can review it.
Thank you
- Click Write
- Then without doing anything in between, post the contents of your /usr/local/nagios/etc/timeperiods.cfg so that we can review it.
Thank you