Error tying to reconfigure nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
[email protected]
Posts: 52
Joined: Wed Nov 12, 2014 3:09 pm

Error tying to reconfigure nagios

Post by [email protected] »

After reading support forum posts I found that I might need to reconfigure but get this error:

login as: root
root@nagiosxi's password:
Last login: Tue Sep 26 14:55:17 2017 from 192.168.16.26
[root@nagiosxi ~]# su - nagios
[nagios@nagiosxi ~]$ cd /usr/local/nagiosxi/scripts
[nagios@nagiosxi scripts]$ ./reconfigure_nagios.sh
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://loc alhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'sub mit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password= taiufp' -O nagiosql.login--2017-09-28 12:15:46-- https://localhost/nagiosxi/inc ludes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:443... connected.




WARNING: cannot verify localhost’s certificate, issued by “/DC=local/DC=grhc/CN= CERT”:
Unable to locally verify the issuer’s authority.
WARNING: certificate common name “nagiosxi.grhc.local” doesn’t match requested h ost name “localhost”.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 19,100 --.-K/s in 0.02s

2017-09-28 12:15:47 (762 KB/s) - “nagiosql.login” saved [19100]

NAGIOSQL LOGIN FAILED!
[nagios@nagiosxi scripts]$
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error tying to reconfigure nagios

Post by scottwilkerson »

Please attach contents of
/usr/local/nagiosxi/scripts/nagiosql.login

We need to see what the error you are getting is
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
[email protected]
Posts: 52
Joined: Wed Nov 12, 2014 3:09 pm

Re: Error tying to reconfigure nagios

Post by [email protected] »

Code: Select all

<!DOCTYPE html>
        <!-- Produced by Nagios XI. Copyright (c) 2008-2017 Nagios Enterprises, LLC (http://www.nagios.com). All Rights Reserved. -->
        <!-- Powered by the Nagios Synthesis Framework -->
        <html>

    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
                <title>CCM · Nagios XI</title>
        <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

        
    <link rel="icon" type="image/png" href="https://localhost/nagiosxi/images/favicon-32x32.png" sizes="32x32">
    <link rel="shortcut icon" href="https://localhost/nagiosxi/images/favicon.ico" type="image/ico">

    <!-- Adding Font-Awesome for all themes -->
    <link rel="stylesheet" type="text/css" href="https://localhost/nagiosxi/includes/css/font-awesome.min.css?1501620844" />

    <!-- Global variables & Javascript translation text -->
    <script type="text/javascript">
    var base_url = "https://localhost/nagiosxi/";
    var backend_url = "https%3A%2F%2Flocalhost%2Fnagiosxi%2Fincludes%2Fcomponents%2Fccm%2Findex.php";
    var ajax_helper_url = "https://localhost/nagiosxi/ajaxhelper.php";
    var ajax_proxy_url = "https://localhost/nagiosxi/ajaxproxy.php";
    var suggest_url = "https://localhost/nagiosxi/suggest.php";
    var request_uri = "%2Fnagiosxi%2Fincludes%2Fcomponents%2Fccm%2F";
    var demo_mode = 0;
    var nsp_str = "77fc3d9c27069b85f071e4ec2deed8df7fbd2bf0f2109d72c56c19d6bd4f27ac";

    // Language string for translations
    var lang = {
        'Add to Dashboard': "Add to Dashboard",
        'Add Dashboard': "Add Dashboard",
        'Edit Dashboard': "Edit Dashboard",
        'Dashlet Title': "Dashlet Title",
        'Dashboard Added': "Dashboard Added",
        'Add It': "Add It",
        'Add this powerful little dashlet to one of your dashboards for visual goodness.': "Add this powerful little dashlet to one of your dashboards for visual goodness.",
        'Select a Dashboard to Add To': "Select a Dashboard to Add To",
        'Add this graph to a dashboard.': "Add this graph to a dashboard.",
        'Dashlet is now loaded on your dashboard.': "Dashlet is now loaded on your dashboard.",
        'Dashlet Added': "Dashlet Added",
        'Please Wait': "Please Wait",
        'Submitting command': "Submitting command",
        'Show Details': "Show Details",
        'Hide Details': "Hide Details",
        'Permalink': "Permalink",
        'Copy the URL below to retain a direct link to your current view.': "Copy the URL below to retain a direct link to your current view.",
        'URL': "URL",
        'Thank You!': "Thank You!",
        'Thanks for helping to make this product better! We will review your comments as soon as we get a chance. Until then, kudos to you for being awesome and helping drive innovation!<br><br> - The Dedicated Team @ Nagios Enterprises': "Thanks for helping to make this product better! We will review your comments as soon as we get a chance. Until then, kudos to you for being awesome and helping drive innovation!<br><br> - The Dedicated Team @ Nagios Enterprises",
        'Error': "Error",
        'An error occurred. Please try again later.': "An error occurred. Please try again later.",
        'Sending Feedback': "Sending Feedback",
        'Use this to add a new dashboard to your Dashboards page.': "Use this to add a new dashboard to your Dashboards page.",
        'Dashboard Title': "Dashboard Title",
        'Background Color': "Background Color",
        'Submit': "Submit",
        'Processing': "Processing",
        'Success! Your new dashboard has been added.': "Success! Your new dashboard has been added.",
        'An error occurred processing your request.': "An error occurred processing your request.",
        'Dashboard Changes Saved': "Dashboard Changes Saved",
        'Success! Your dashboard was updated successfully.': "Success! Your dashboard was updated successfully.",
        'You cannot delete your home page dashboard.': "You cannot delete your home page dashboard.",
        'Confirm Dashboard Deletion': "Confirm Dashboard Deletion",
        'Are you sure you want to delete this dashboard and all dashlets it contains?': "Are you sure you want to delete this dashboard and all dashlets it contains?",
        'Delete': "Delete",
        'Cancel': "Cancel",
        'The requested dashboard has been deleted.': "The requested dashboard has been deleted.",
        'Dashboard Deleted': "Dashboard Deleted",
        'Clone Dashboard': "Clone Dashboard",
        'Use this to make an exact clone of the current dashboard and all its wonderful dashlets.': "Use this to make an exact clone of the current dashboard and all its wonderful dashlets.",
        'Clone': "Clone",
        'New Title': "New Title",
        'Dashboard Cloned': "Dashboard Cloned",
        'Dashboard successfully cloned.': "Dashboard successfully cloned.",
        'Deleting dashlets from the home page dashboard is disabled while in demo mode.': "Deleting dashlets from the home page dashboard is disabled while in demo mode.",
        'Dashlet Deleted': "Dashlet Deleted",
        'Dashlet removed from dashboard.': "Dashlet removed from dashboard.",
        'The dashlet has been added and will now show up on your dashboard.': "The dashlet has been added and will now show up on your dashboard.",
        'Masquerade Notice': "Masquerade Notice",
        'You are about to masquerade as another user. If you choose to continue you will be logged out of your current account and logged in as the selected user. In the process of doing so, you may lose your admin privileges.': "You are about to masquerade as another user. If you choose to continue you will be logged out of your current account and logged in as the selected user. In the process of doing so, you may lose your admin privileges.",
        'Continue': "Continue",
        'Add View': "Add View",
        'Use this to add what you see on the screen to your views page.': "Use this to add what you see on the screen to your views page.",
        'View Title': "View Title",
        'View Added': "View Added",
        'Success! Your view was added to your views page.': "Success! Your view was added to your views page.",
        'View Deleted': "View Deleted",
        'View has been removed.': "View has been removed.",
        'Edit View': "Edit View",
        'View Changes Saved': "View Changes Saved",
        'Success! Your view was updated successfully.': "Success! Your view was updated successfully.",
        'Start Rotation': "Start Rotation",
        'Stop Rotation': "Stop Rotation",
        'Pause rotation': "Pause rotation",
        'Resume rotation': "Resume rotation",
        'You are about to delete the view': "You are about to delete the view",
        'Cannot schedule outside pages.': "Cannot schedule outside pages.",
        'Any page not under nagiosxi cannot be scheduled.': "Any page not under nagiosxi cannot be scheduled.",
        'Loading': "Loading",
        'Update': "Update",
        'Close': "Close",
        'Time Range': "Time Range",
        'Last 4 Hours': "Last 4 Hours",
        'Last 24 Hours': "Last 24 Hours",
        'Last Week': "Last Week",
        'Last Month': "Last Month",
        'Last Year': "Last Year",
        'Last 7 Days': "Last 7 Days",
        'Last 30 Days': "Last 30 Days",
        'Last 365 Days': "Last 365 Days",
        'My Graph': "My Graph",
        'You must fill out the entire form.': "You must fill out the entire form.",
        'Copy to Clipboard': "Copy to Clipboard",
        'Copied': "Copied",
        'Press Ctrl+C to copy': "Press Ctrl+C to copy"
    };

    // Translation helper function
    function _(str) {
        var trans = lang[str];
        if (trans) { return trans; }
        return str;
    }
    </script>

    <!-- main jquery libraries -->
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery-1.12.4.min.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery-migrate-1.4.1.min.js?1501620844'></script>
    <link type="text/css" href="https://localhost/nagiosxi/includes/js/jquery/css/smoothness/jquery-ui.custom.min.css?1501620844" rel="stylesheet"/>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery.colorBlend.js'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery.timers-1.1.3.js'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery-ui-1.12.1.custom.min.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery-ui-timepicker-addon.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/jquery/jquery.searchabledropdown.custom.js?1501620844'></script>

    <link rel="stylesheet" href="https://localhost/nagiosxi/includes/css/bootstrap.3.min.css?1501620844" type="text/css" />
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/bootstrap.3.min.js?1501620844'></script>

    <!-- spin kit -->
    <link rel="stylesheet" href="https://localhost/nagiosxi/includes/css/spinkit.css?1501620844" type="text/css" />

    <!-- jquery autocomplete -->
    <link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/css/jquery.autocomplete.css'/>

    <!-- colorpicker -->
    <link rel="stylesheet" href="https://localhost/nagiosxi/includes/js/jquery/colorpicker/css/colorpicker.css" type="text/css" />
    <script type="text/javascript" src="https://localhost/nagiosxi/includes/js/jquery/colorpicker/js/colorpicker.js"></script>

    <!-- clipboard plugin -->
    <script type="text/javascript" src="https://localhost/nagiosxi/includes/js/clipboard.min.js"></script>

    
    <!-- XI JS Scripts -->
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/core.js?1501620844'></script>
        <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/themes/modern.js?1501620844'></script>
        
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/commands.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/views.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/dashboards.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/dashlets.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/tables.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/users.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/perfdata.js?1501620844'></script>
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/wizards.js?1501620844'></script>

    <!-- XI CSS -->
    <link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/css/base.css?1501620844' />
        <link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/css/themes/modern.css?1501620844' />
    
    <!-- Highcharts Graphing Library -->
    <script type="text/javascript" src="https://localhost/nagiosxi//includes/js/highcharts/highcharts.js?1501620844"></script>
            <script type="text/javascript" src="https://localhost/nagiosxi//includes/js/highcharts/highcharts-more.js?1501620844"></script>
            <script type="text/javascript" src="https://localhost/nagiosxi//includes/js/highcharts/modules/exporting.js?1501620844"></script>
            <script type="text/javascript" src="https://localhost/nagiosxi//includes/js/highcharts/modules/no-data-to-display.js?1501620844"></script>
    <!-- D3 Graphing Library -->
    <script type='text/javascript' src='https://localhost/nagiosxi/includes/js/d3/d3.v3.min.js?1501620844'></script>

    <script type='text/javascript' src='https://localhost/nagiosxi/includes/dashlets/gauges/js/gauge.js'></script>
<link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/dashlets/internettrafficreport/internettrafficreport.css' />
<link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/dashlets/rss_dashlet/rss_dashlet.css' />
<link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/dashlets/worldtimeserver/worldtimeserver.css' />
<link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/components/ccm/css/style.css?2.6.8' /><script type="text/javascript" src="https://localhost/nagiosxi/includes/components/ccm/javascript/main_js.js?2.6.8"></script>
              <script type="text/javascript">
              var NAGIOSXI=true
              </script><script type="text/javascript" src="https://localhost/nagiosxi/includes/components/graphexplorer/includes/graphexplorerinclude.js"></script><link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/components/helpsystem/css/helpsystem.css?1.1.1' /><link rel='stylesheet' type='text/css' href='https://localhost/nagiosxi/includes/components/helpsystem/css/bootstrap-tour.min.css?1.1.1' /><script type='text/javascript' src='https://localhost/nagiosxi/includes/components/helpsystem/js/helpsysteminclude.js?1.1.1'></script><script type='text/javascript' src='https://localhost/nagiosxi/includes/components/helpsystem/js/bootstrap-tour.min.js?1.1.1'></script>    </head>

    <body  class=' child' >

    
    
    <div  class="childpage">

    <div id="whiteout"></div>
    <div id="blackout"></div>

    <div id ="childheader" class="childhead" >
        
<!--- CHILD HEADER START -->

<div id="child_popup_layer">
    <div id="child_popup_content">
        <div id="child_popup_close">
            <a id="close_child_popup_link" style="display: inline-block;" title="Close"><i class="fa fa-times" style="font-size: 16px;"></i></a>
        </div>
        <div id="child_popup_container">
        </div>
    </div>
</div>

<!--- CHILD HEADER END -->        <div id="throbber" class="sk-spinner sk-spinner-center sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>

    <script type="text/javascript">
var CCM_SESSION_ID = 0;
var CCM_LOCK = { };

$(document).ready(function() {

    if (CCM_SESSION_ID) {

        $(window).on('beforeunload', function() {
            $.post('ajax.php', { cmd: 'removesession', ccm_session_id: CCM_SESSION_ID }, function(d) { });
        });

        // Update the session if user is just sitting on a page (or editing it)
        var update_id = setInterval(update_session_and_lock, 10000);

        check_page_usage();
    }

    $(window).resize(function() {
        $('#lock-notice').center().css('top', '250px');
    });

    $('#remove-lock').click(function() {
        $.post('ajax.php', { cmd: 'takelock', lock_id: CCM_LOCK.id, ccm_session_id: CCM_SESSION_ID }, function(d) {
            if (d.success) {
                CCM_LOCK = { }
                $('#lock-notice').hide();
                clear_whiteout();
            }
        }, 'json');
    });
});

function update_session_and_lock()
{
    // Update session and return lock values
    var vars = { cmd: 'updatesession', ccm_session_id: CCM_SESSION_ID, obj_id: 0 };
    if (CCM_LOCK.id) {
        vars.lock_id = CCM_LOCK.id;
    }

    // Update session and get new lock if there is one
    $.post('ajax.php', vars, function(d) {
        if (d.has_new_lock) {
            CCM_LOCK = d.lock;
            $('.lock-text').html(d.locktext);
            check_page_usage();
        }
    }, 'json');
}

function check_page_usage()
{
    if (CCM_LOCK.id) {
        whiteout();
        $('#lock-notice').center().css('top', '250px').show();
    }
}

window.parent.$("#ccm-apply-menu-link").html('<span class="tooltip-apply" data-placement="right" title="There are modifications to objects that have not been applied yet. Apply configuration for new changes to take affect."><i class="fa fa-fw fa-asterisk urgent"></i> Apply Configuration</span>');
window.parent.$('.tooltip-apply').tooltip({ template: '<div class="tooltip ccm-tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', container: 'body' });

window.parent.$('#fullscreen').addClass('white');
window.parent.$('div#leftnav a').click(function() {
    window.parent.$('#fullscreen').removeClass('white');
    window.parent.$('div#leftnav a').unbind();
});

</script>
    <div id="screen-overlay"></div>
    <div id="whiteout"></div>
    <div id="lock-notice" class="hide info-popup" style="text-align: center; padding: 25px;">
        <h4><i class="fa fa-exclamation-triangle" style="vertical-align: middle;"></i> The page is currently being edited by another user.</h4>
        <div class="lock-text">
                    </div>
        <div class="btns">
            <button type="button" id="remove-lock" class="btn btn-sm btn-danger">Remove Lock</button>
            <a href="" class="btn btn-sm btn-default">Cancel</a>
        </div>
    </div>
    <div id="loginMsgDiv" style="display: none;">
        <span >
            <div class='error'>
                Contact your Nagios XI administrator if you have forgotten your login credentials.<br />Need to initialize or reset the config manager admin password? <a target="_blank" href="/nagiosxi/admin/?xiwindow=credentials.php">Click here</a>.            </div>
        </span>
    </div>


    <div id='loginDiv'>
        <h3>Nagios CCM Login</h3>
        <form id='loginForm' action='index.php' method='post'>
            <label for='username'>Username: </label><br />
            <input type='text' name='username' id='username' size='20'  autocomplete='off'/><br /><br />
            <label for='password'>Password</label><br />
            <input type='password' name='password' id='password' size='20'  autocomplete='off'/><br /><br />
            <input type='hidden' name='loginSubmitted' value='true' />
            <input type='hidden' name='menu' value='invisible' />
            <input class='ccmbutton' type='submit' name='submit' id='submit' value='Login' />
        </form>
    </div><!-- CHILD FOOTER START -->


<!-- CHILD FOOTER END -->

    </div><!--page-->

    <noframes>
        <!-- This page requires a web browser which supports frames. -->
        <h2>Nagios XI</h2>
        <p align="center">
            <a href="https://www.nagios.com/">www.nagios.com</a><br>
            Copyright (c) 2009-2017 Nagios Enterprises, LLC<br>
        </p>
        <p>
            <i>Note: These pages require a browser which supports frames</i>
        </p>
    </noframes>

    
    
    </body>
</html>
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error tying to reconfigure nagios

Post by scottwilkerson »

Can you go to Configure -> Core Configure Manager -> CCM Admin -> Manage Users
And verify that there is a username "nagiosxi" and it is marked Active=Yes

If so, I'd like you to go to Configure -> Core Configure Manager -> CCM Admin -> Settings and uncheck
"Enable page locking for multiple users editing same page"

Click Save Settings
Then try to Apply Configuration in the upper left
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
[email protected]
Posts: 52
Joined: Wed Nov 12, 2014 3:09 pm

Re: Error tying to reconfigure nagios

Post by [email protected] »

There was no "nagiosxi" user so I created it.

I then unchecked "Enable page locking for multiple users editing same page"

Then Apply configuration....

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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error tying to reconfigure nagios

Post by tgriep »

You may need to reset the security credentials after creating the nagiosxi account.
Login to the GUI and go to the Admin > Security Credentials menu, just press the Update Credentials button without changing anything else.
Then see if the reconfigure_nagios.sh script will run or an Apply Config from the GUI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked