Apply Configuration fails with the following error:
Backend login to the Core Config Manager failed.
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.
This problem can be caused by the Nagios XI server being unable to resolve "localhost".
Open an SSH session to your Nagios XI server and execute the following commands:
You receive the following output:
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2016-08-03 10:10:46-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... failed: Name or service not known.
wget: unable to resolve host address “localhost”
NAGIOSQL LOGIN FAILED!
You can see in the last three lines that the wget command is complaining that it cannot resolve localhost.
If you execute the following command you can see the contents of the /etc/hosts file:
Here is the output:
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 xi-c6x-x64
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 xi-c6x-x64
If you look at the output you can see that there are no "localhost" entries, there are similar entries but not one for "localhost".
Edit your /etc/hosts file and make sure there are localhost entries. For example:
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost xi-c6x-x64
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost xi-c6x-x64
After making these changes try and "Apply Configuration" from Core Configuration Manager and your problem should be resolved.
For any support related questions please visit the Nagios Support Forums at:
Article ID: 532
Created On: Tue, Aug 2, 2016 at 8:26 PM
Last Updated On: Fri, Apr 7, 2017 at 11:44 AM
Authored by: tlea
Online URL: https://support.nagios.com/kb/article/nagios-xi-apply-configuration-fails-backend-login-to-the-core-configuration-failed-532.html