Apply Configuration never complete

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
strmon
Posts: 31
Joined: Mon Dec 26, 2016 3:42 am

Apply Configuration never complete

Post by strmon »

Hi,


Recently we moved from http to https but due to this, "apply configuration" is failing and never completes. Logs below:-
77...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-03-22 15:24:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://localhost/nagiosxi/includes/components/ccm/ [following]
--2017-03-22 15:24:00-- https://localhost/nagiosxi/includes/components/ccm/
Connecting to localhost|127.0.0.1|:443... connected.
WARNING: cannot verify localhost’s certificate, issued by “/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4”:
Unable to locally verify the issuer’s authority.
WARNING: no certificate subject alternative name matches
requested host name “localhost”.
HTTP request sent, awaiting response... 302 Found
Location: https://localhost/nagiosxi/login.php?re ... f&noauth=1 [following]
Location: https://localhost/nagiosxi/login.php?re ... f&noauth=1 [following]
--2017-03-22 15:24:00-- https://localhost/nagiosxi/login.php?re ... f&noauth=1
Connecting to localhost|127.0.0.1|:443... connected.
WARNING: cannot verify localhost’s certificate, issued by “/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4”:
Unable to locally verify the issuer’s authority.
WARNING: no certificate subject alternative name matches
requested host name “localhost”.
HTTP request sent, awaiting response... 200 OK
Length: unspecifiedLength: unspecified [text/html]
Saving to: “nagiosql.login”

0K .......... .......... ..... 946K=0.03s

2017-03-22 15:24:01 (946 KB/s) - “nagiosql.login” saved [25876]

/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&backend=1&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
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&backend=1&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
..
PROCESSED 1 COMMANDS
....................
strmon
Posts: 31
Joined: Mon Dec 26, 2016 3:42 am

Re: Apply Configuration never complete

Post by strmon »

If apache redirection is stopped i.e if i comment below line in httpd.conf, this are working fine:-

#RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I've followed nagiosxi steps on exchange to enable SSL. Please advice how to fix it.
strmon
Posts: 31
Joined: Mon Dec 26, 2016 3:42 am

Re: Apply Configuration never complete

Post by strmon »

As a temporary fix, i've instructed apache to ignore "localhost" by adding "RewriteCond %{HTTP_HOST} !=localhost" to below code in httpd.conf and its working fine now.
RewriteEngine On
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

But i would like to know if their is any other fix to this issue.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Apply Configuration never complete

Post by avandemore »

Can you attach or PM me the file /usr/local/nagiosxi/html/config.inc.php and also send a screenshot of:
XI > Admin > System Config > System Settings
Previous Nagios employee
strmon
Posts: 31
Joined: Mon Dec 26, 2016 3:42 am

Re: Apply Configuration never complete

Post by strmon »

PFA: XI system Settings
System-settings.PNG
:Config.inc.php
config.txt
You do not have the required permissions to view the files attached to this post.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Apply Configuration never complete

Post by avandemore »

If you follow this document it should work:

https://assets.nagios.com/downloads/nag ... s%20XI.pdf

For one, you need to have this set in /usr/local/nagiosxi/html/config.inc.php:

Code: Select all

$cfg['use_https'] = true;
Previous Nagios employee
strmon
Posts: 31
Joined: Mon Dec 26, 2016 3:42 am

Re: Apply Configuration never complete

Post by strmon »

Thank you..! I followed the same doc, not sure how missed the php configuration. Anyway, how to doc is perfectly working.

Thank you, its OK to mark this thread solved.
Locked