apply configuration issue
-
abhay_singh
- Posts: 8
- Joined: Tue Jan 12, 2016 4:53 am
apply configuration issue
Hi,
I am getting following error while applying configuration:
Apply Configuration
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.
So please help have a look and revert back with possible solution,any kind of help would be appreciative.
Thanks,
Abhay
I am getting following error while applying configuration:
Apply Configuration
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.
So please help have a look and revert back with possible solution,any kind of help would be appreciative.
Thanks,
Abhay
Re: apply configuration issue
I am going to assume you have some sort of configuration error. Are there more errors shown on the screen?
Former Nagios Employee.
me.
me.
Re: apply configuration issue
Hi,
Please let us know of the following so we can better assist:
1) What version of Nagios XI are you using?
2) Are you accessing the Nagios XI web interface via https?
3) Is XI behind a proxy?
4) Have you changed any passwords?
5) What change did you make which prompted the need to apply configuration?
Additionally, run the following commands:
Then run this command to begin capturing log output:
Attempt to Apply Configuration from the web interface. After the browser has returned some output to the screen, press Ctrl+c to stop the log tail, and post the cmd.txt file and the reconfig.txt that was generated in the "/tmp" directory from the 1st set of commands.
Please let us know of the following so we can better assist:
1) What version of Nagios XI are you using?
2) Are you accessing the Nagios XI web interface via https?
3) Is XI behind a proxy?
4) Have you changed any passwords?
5) What change did you make which prompted the need to apply configuration?
Additionally, run the following commands:
Code: Select all
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> /tmp/reconfig.txtCode: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/cmd.txtBe sure to check out the Knowledgebase for helpful articles and solutions!
-
abhay_singh
- Posts: 8
- Joined: Tue Jan 12, 2016 4:53 am
Re: apply configuration issue
Hi,
1) I am using Nagios XI 5.2.3 version.
2) No I am accessing it via http.
3)Yes XI is behind proxy..
4)No I have not changed any passwords.
5)By Default it was showing verify configuration andthen first I verified that and I tried to apply cofiguration then it prompted this error.
I am also attaching files as you have asked so please have a look and suggest something.
Thanks,
Abhay
1) I am using Nagios XI 5.2.3 version.
2) No I am accessing it via http.
3)Yes XI is behind proxy..
4)No I have not changed any passwords.
5)By Default it was showing verify configuration andthen first I verified that and I tried to apply cofiguration then it prompted this error.
I am also attaching files as you have asked so please have a look and suggest something.
Thanks,
Abhay
You do not have the required permissions to view the files attached to this post.
Re: apply configuration issue
Can you navigate to Configure -> Core Config Manager -> On the right side look for a 'Snapshot Result' that says 'Config Error' and click the document next to it.
It should look like this -
It should look like this -
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
Re: apply configuration issue
Hello,
I also had an issue with "Apply configuration".
Simple installation, only localhost and default services (and trying to add new service).
Using GUI - CCM - Nagios 5.3.2 -> Waiting for configuration verification................. (never ends)
Using ./reconfigure_nagios.sh in shell -> No problems, script execute until the end without error.
Using GUI - CCM - Nagios 5.3.2 and monitoring file cmdsubsys.log at the same time (see Attachment) -> everything goes well until the end ... why it doesn't stop or exit the waiting method .
While running the command using the button (cmd line + reconfigure_nagios.sh script) an insert is done in database nagiosxi table xi_commands and while the script run, the line is updated. At the end of the script, the line is like this :
So, to exit the waiting loop, csobj.status_code should be equal 2 (2 means everything went well). Suspicion : are csobj / csdata updated ? NO !! Why ? Following the lead get_ajax_data to ajax_helper.php - function route_request, and then to the function ah_get_command_status. It appears that get_backend_xml_data does not return ANY data !!
I'm really stuck. Please help ...
(Suspicion : get_backend_xml_data is define in the protected part of Nagiosxi - Sourceguardian ?! anyway, I'm stuck)
I also had an issue with "Apply configuration".
Simple installation, only localhost and default services (and trying to add new service).
Using GUI - CCM - Nagios 5.3.2 -> Waiting for configuration verification................. (never ends)
Using ./reconfigure_nagios.sh in shell -> No problems, script execute until the end without error.
Using GUI - CCM - Nagios 5.3.2 and monitoring file cmdsubsys.log at the same time (see Attachment) -> everything goes well until the end ... why it doesn't stop or exit the waiting method .
While running the command using the button (cmd line + reconfigure_nagios.sh script) an insert is done in database nagiosxi table xi_commands and while the script run, the line is updated. At the end of the script, the line is like this :
Let's check which function is attached to the button -> check the file /html/includes/components/nagioscorecfg/applyconfig.php :mysql> select * from xi_commands where command_id = 67;
+------------+----------+--------------+----------------+---------+---------------------+---------------------+----------------+-----------------+--------------------+---------------------+-------------+-------------+--------------+------------------------+
| command_id | group_id | submitter_id | beneficiary_id | command | submission_time | event_time | frequency_type | frequency_units | frequency_interval | processing_time | status_code | result_code | command_data | result |
+------------+----------+--------------+----------------+---------+---------------------+---------------------+----------------+-----------------+--------------------+---------------------+-------------+-------------+--------------+------------------------+
| 67 | 0 | 1 | 0 | 17 | 2016-01-16 14:11:21 | 2016-01-16 14:11:10 | 0 | 0 | 0 | 2016-01-16 14:11:21 | 2 | 0 | | Starting nagios: done. |
+------------+----------+--------------+----------------+---------+---------------------+---------------------+----------------+-----------------+--------------------+---------------------+-------------+-------------+--------------+------------------------+
1 row in set (0.00 sec)
function applyconfig_get_apply_config_result(command_id) {
$('#commandwaiting').html('<?php echo _("Waiting for configuration verification..."); ?>');
var intvid = setInterval(function () {
$(".commandresultwaiting").append(".");
var csdata = get_ajax_data("getcommandstatus", command_id);
eval('var csobj=' + csdata);
if (csobj.status_code > 1) {
if (csobj.result_code == 0) {
$('.commandresultwaiting').each(function () {
$(this).removeClass("commandresultwaiting");
$(this).addClass("commandresultok");
});
$('#commandsuccesscontent').each(function () {
$(this).show();
});
$('#commandwaiting').html("<?php echo _("Configuration applied successfully"); ?>.");
So, to exit the waiting loop, csobj.status_code should be equal 2 (2 means everything went well). Suspicion : are csobj / csdata updated ? NO !! Why ? Following the lead get_ajax_data to ajax_helper.php - function route_request, and then to the function ah_get_command_status. It appears that get_backend_xml_data does not return ANY data !!
My problem is that get_backend_xml_data does not return ANY data and it is generalized to each use of this function. I trace several use of this function back to the command (GUI function, buttons,...) none of them works. I can't find the function definition anywhere or any information of any kind which could help me. Meanwhile, ndo2db is running with ndomod without error. I have no track or something to follow any more ...function ah_get_command_status()
{ ...
// get command status from backend
$args = array(
"cmd" => "getcommands",
"command_id" => $opts );
$xml = get_backend_xml_data($args);
if ($xml) {
$result["command_id"] = intval($opts);
if ($xml->command[0]) {
... ... ...
}
}
$output = json_encode($result);
echo $output;
}
I'm really stuck. Please help ...
(Suspicion : get_backend_xml_data is define in the protected part of Nagiosxi - Sourceguardian ?! anyway, I'm stuck)
You do not have the required permissions to view the files attached to this post.
-
abhay_singh
- Posts: 8
- Joined: Tue Jan 12, 2016 4:53 am
Re: apply configuration issue
hey i have attached the screenshot of configuration snapshots screen and there is no config error on that screen.
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: apply configuration issue
Looking at the output in cmd.txt:abhay_singh wrote: I am also attaching files as you have asked so please have a look and suggest something.
Code: Select all
GIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2016-01-15 10:39:14-- http://localhost/nagiosxi/includes/components/ccm/
Connecting to 10.44.208.10:8080... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://10.51.228.237 [following]
--2016-01-15 10:39:14-- http://10.51.228.237/
Connecting to 10.44.208.10:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 3026 (3.0K) [text/html]
Saving to: “nagiosql.login”Please have a look at this article, specifically needing a no_proxy entry in /etc/wgetrc.
http://support.nagios.com/wiki/index.ph ... th_Proxies
Let us know if that fixes your problem.
If it doesn't, run this command and then do the Apply Config again:
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/cmd.txtAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
abhay_singh
- Posts: 8
- Joined: Tue Jan 12, 2016 4:53 am
Re: apply configuration issue
problem is resolved now.
I have made changes in /etc/wgetrc file and made the entries for http_proxy,https_proxy,no_proxy.
I have made changes in /etc/wgetrc file and made the entries for http_proxy,https_proxy,no_proxy.
Re: apply configuration issue
Thanks for that update and glad to hear this is resolved. We'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!