Error after Apply configuration
Error after Apply configuration
We have a problem applying changes to the configuration . We are getting
An error occurred while attempting to apply your configuration to Nagios Core.Configurations failed to write to file. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
The snapshot is not showing any error we can trace for today
When I tried tool-write config files- write monitoring data/check config i dont see any error, checking configuration files with -v option return success
I tried a couple of things..restart nagios/nagiosxi, reboot the server and repair the database..no luck
Can you help to troubleshoot?
An error occurred while attempting to apply your configuration to Nagios Core.Configurations failed to write to file. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
The snapshot is not showing any error we can trace for today
When I tried tool-write config files- write monitoring data/check config i dont see any error, checking configuration files with -v option return success
I tried a couple of things..restart nagios/nagiosxi, reboot the server and repair the database..no luck
Can you help to troubleshoot?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error after Apply configuration
Let's try this, log in to your XI server as root and run the following
Then this
Then if you could post the reconfig.txt we'll have a look
Code: Select all
/usr/local/nagiosxi/scripts/reset_config_perms
Code: Select all
cd /usr/local/nagiosxi/scripts
reconfigure_nagios.sh &> reconfig.txtRe: Error after Apply configuration
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca
lhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUser
name=nagiosxi&tfPassword=xxxx' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...Array
(
)
RESETTING PERMS
SETUID ROOT OK
URL: http://localhost/nagiosql/index.php
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca
lhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUser
name=nagiosxi&tfPassword=xxxxx' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosql/admin/verify.php
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/ve
rify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.exp
ort.monitoring
NAGIOSQL WRITE CONFIGS FAILED!\n
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca
lhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUser
name=nagiosxi&tfPassword=xxxx' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...Array
(
)
RESETTING PERMS
SETUID ROOT OK
URL: http://localhost/nagiosql/index.php
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca
lhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUser
name=nagiosxi&tfPassword=xxxxx' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosql/admin/verify.php
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/ve
rify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.exp
ort.monitoring
NAGIOSQL WRITE CONFIGS FAILED!\n
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error after Apply configuration
Can we do the following:
Then
If you could attach the whole reconfig.txt file that would be great because the board eats some of what you paste in.
Code: Select all
cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/scripts/NagiosXI-FixPerms.sh
chmod +x NagiosXI-FixPerms.sh
./NagiosXI-FixPerms.sh
Code: Select all
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> reconfig.txtRe: Error after Apply configuration
file attached
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: Error after Apply configuration
Ok, let's go back to the web interface and I would like to to do the following:
Configure -> Core Config Manager -> Tools -> Write Config Files
We are going to click go on each of these from the top down until we get an error, and then report back with any errors.
Configure -> Core Config Manager -> Tools -> Write Config Files
We are going to click go on each of these from the top down until we get an error, and then report back with any errors.
Re: Error after Apply configuration
Writing monitoring data--after two minues replays with a blank page..no error, zero info, page only contains the "nagios Core Config manager" header
writing 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 files
Total Warnings: 44
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Restart nagios
restart without problems
writing 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 files
Total Warnings: 44
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Restart nagios
restart without problems
Re: Error after Apply configuration
I suspect you're hitting either a timeout or memory limit with PHP, I'm guessing it's a larger set of configs that you're applying. Take a look at this wiki and see if it resolves the issue:
http://support.nagios.com/wiki/index.ph ... _Completes
http://support.nagios.com/wiki/index.ph ... _Completes
Re: Error after Apply configuration
Bingo!
The memory was set to 512M, but the timeout was set to 60, i increased both to 120, the files are written now and configuration applied successfully
Thanks for all your help..happy new year
The memory was set to 512M, but the timeout was set to 60, i increased both to 120, the files are written now and configuration applied successfully
Thanks for all your help..happy new year
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error after Apply configuration
Glad to see you got it working. Happy New Year to you as well!