Cannot Apply Configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Cannot Apply Configuration

Post by aap »

Hi,

Anytime I try to apply configuration i get the error..

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.

Please see below the information from running the command

tail -f /usr/local/nagiosxi/var/cmdsubsys.log

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: 4788 (4.7K) [text/html]
Saving to: `nagiosql.export.monitoring'

0K .... 100% 344M=0s

2012-05-16 16:12:11 (344 MB/s) - `nagiosql.export.monitoring' saved [4788/4788]

NAGIOSQL WRITE CONFIGS FAILED!\n
OUTPUT=NAGIOSQL WRITE CONFIGS FAILED!\n
RETURNCODE=5

PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
..
PROCESSED 0 COMMANDS

0K ..... 100% 350M=0s

2012-05-16 16:11:18 (350 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&tfUsername=nagiosxi&tfPassword=nagios' -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.export.monitoring
--2012-05-16 16:11:18-- http://localhost/nagiosql/admin/verify.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.

Please help!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot Apply Configuration

Post by scottwilkerson »

Please send the output of the following command

Code: Select all

ls -l /usr/local/nagiosxi/scripts
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Cannot Apply Configuration

Post by aap »

Hi,

-rwxr-x---. 1 nagios nagios 2757 Mar 8 11:21 backup_xi.sh
-rw-r----- 1 nagios nagios 21878 Nov 21 09:08 cmd.txt
-rwxr-x---. 1 nagios nagios 649 Mar 8 11:21 export_nagiosql.sh
-rwxr-x---. 1 nagios nagios 1017 Nov 16 14:35 fixperms.sh
-rwxr-x---. 1 nagios nagios 821 Mar 8 11:21 handle_nagioscore_event.php
-rwxr-x---. 1 nagios nagios 829 Mar 8 11:21 handle_nagioscore_notification.php
-rwxr-x---. 1 nagios nagios 429 Mar 8 11:21 import_nagiosql.sh
-rwxr-x---. 1 nagios nagios 149 Mar 8 11:21 kill_rrdtool.sh
-rw-r-----. 1 nagios nagios 153 May 16 17:12 nagiosql.cookies
-rwxr-x---. 1 nagios nagios 253324 Mar 8 11:21 nagiosql_defaults.sql
-rw-r----- 1 nagios nagios 14195 Jan 20 10:53 nagiosql.delete.contact
-rwxr-x---. 1 nagios nagios 970 Mar 8 11:21 nagiosql_delete_contact.php
-rw-r----- 1 nagios nagios 31911 Mar 29 10:37 nagiosql.delete.host
-rwxr-x---. 1 nagios nagios 961 Mar 8 11:21 nagiosql_delete_host.php
-rwxr-x---. 1 nagios nagios 505 Mar 8 11:21 nagiosql_delete_object.sh
-rw-r----- 1 nagios nagios 73012 May 1 12:33 nagiosql.delete.service
-rwxr-x---. 1 nagios nagios 970 Mar 8 11:21 nagiosql_delete_service.php
-rw-r----- 1 nagios nagios 19589 Jan 20 10:53 nagiosql.delete.timeperiod
-rwxr-x---. 1 nagios nagios 993 Mar 8 11:21 nagiosql_delete_timeperiod.php
-rw-r-----. 1 nagios nagios 7400 May 16 13:22 nagiosql.export.additional
-rwxr-x---. 1 nagios nagios 1637 Mar 8 11:21 nagiosql_exportall.php
-rw-r-----. 1 nagios nagios 4788 May 16 17:13 nagiosql.export.monitoring
-rwxr-x---. 1 nagios nagios 1323 Mar 8 11:21 nagiosql_importall.php
-rw-r-----. 1 nagios nagios 4639672 May 16 17:12 nagiosql.import.monitoring
-rw-r-----. 1 nagios nagios 5286 May 16 17:12 nagiosql.login
-rwxr-x---. 1 nagios nagios 1847 Mar 8 11:21 nagiosql_login.php
-rwxr-x---. 1 nagios nagios 258 Mar 8 11:21 nagiosql_trim_backups.sh
-rwxr-x---. 1 nagios nagios 515 Mar 8 11:21 nom_create_nagioscore_checkpoint_cond.sh
-rwxr-x---. 1 nagios nagios 717 Mar 8 11:21 nom_create_nagioscore_checkpoint.sh
-rwxr-x---. 1 nagios nagios 632 Mar 8 11:21 nom_create_nagioscore_errorpoint.sh
-rwxr-x---. 1 nagios nagios 784 Mar 8 11:21 nom_restore_nagioscore_checkpoint.sh
-rw-r----- 1 nagios nagios 757 Mar 8 11:21 nom_restore_nagioscore_checkpoint_specific.sh
-rwxr-x---. 1 nagios nagios 2104 Mar 8 11:21 nom_trim_nagioscore_checkpoints.sh
-rwxr-x---. 1 nagios nagios 4271 Mar 8 11:21 parse_core_eventlog.php
-rwxr-x---. 1 nagios nagios 3795 Mar 8 11:21 patch_ndoutils.php
-rw-r----- 1 nagios nagios 48 May 16 16:09 reconfig.txt
-rwxrwx---. 1 nagios nagios 597 Mar 8 11:21 reconfigure_nagios.sh
-rwxr-x---. 1 nagios nagios 1037 Mar 8 11:21 repairmysql.sh
-rwsr-xr-x. 1 root root 4976 Mar 8 11:21 reset_config_perms
-rwxr-x---. 1 nagios nagios 280 Mar 8 11:21 reset_config_perms.c
-rwsr-xr-x. 1 root root 586 Mar 8 11:21 reset_config_perms.sh
-rwxr-x---. 1 nagios nagios 1155 Mar 8 11:21 reset_nagiosadmin_password.php
-rwxr-x---. 1 nagios nagios 944 Mar 8 11:21 restart_nagios_with_export.sh
-rwxr-x---. 1 nagios nagios 765 Mar 8 11:21 restore_defaults.sh
-rwxr-x---. 1 nagios nagios 4010 Mar 8 11:21 restore_xi.sh
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Cannot Apply Configuration

Post by lmiltchev »

Do you get any config errors when you run the Write Config Tool?

http://assets.nagios.com/downloads/nagi ... tabase.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Cannot Apply Configuration

Post by aap »

Hi,

Please see the results attached. I do get a blank screen without any errors when I try to Write monitoring data.

Any help is appreciated.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot Apply Configuration

Post by scottwilkerson »

I thing you need to increase your max_execution_time & memory_limit in your php.ini file...

Instructions are here

http://support.nagios.com/wiki/index.ph ... _Completes
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Cannot Apply Configuration

Post by aap »

Thanks. Working fine now.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Cannot Apply Configuration

Post by lmiltchev »

Great!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked