Page 4 of 5

Re: Login, get blank page

Posted: Mon Oct 04, 2021 2:00 pm
by pbroste
Hello @murdock

Thanks for following up with the details letting me know that PHP 5.4.16 are working on other instances. You stated the following: "...p2n was working fine until I enabled AD integration -- and I've never been able to login [to the XI web GUI regardless of AD or Local account] since."

I want to go forward and verify that we ruled that out with the API commands earlier by doing the following:

From Command line:

Code: Select all

curl -XPOST "https://yournagiosaddresshere/nagiosxi/api/v1/authenticate?pretty=1" -d "username=nagiosadmin&password=<yourlocaladminpassword>&valid_min=15" -k
The example output will look like:

Code: Select all

{
    "username": "nagiosadmin",
    "user_id": "1",
    "auth_token": "704df2d61882f431c4c3dbb9672efd4c19580745",
    "valid_min": 15,
    "valid_until": "Mon, 04 Oct 2021 13:55:33 -0500"
}
Bring up a incognito or private mode browser session and in the URL insert and run:

Code: Select all

https://yournagiosaddresshere/nagiosxi/login.php?token=<auth_token>
Please let me know the results, with the token the browser will load to the homepage without the need to login. Development Tools > on the Network tab will provide feedback.

Thanks,
Perry

Re: Login, get blank page

Posted: Mon Oct 04, 2021 6:39 pm
by murdock
Hi Perry,

[root@xxxxxxxxxx ~]# curl -XPOST "https://xxxxxxxxxx/nagiosxi/api/v1/auth ... e?pretty=1" -d "username=nagiosadmin&password=**********&valid_min=15" -k
[root@xxxxxxxxxx ~]#

As indicated, the command produces no output; no file is created either. I've checked this against other working instances; and I've validated the password.

Any suggestions?

Rob

Re: Login, get blank page

Posted: Tue Oct 05, 2021 3:08 pm
by pbroste
Hello Rob,

What do you get on that curl command with 'verbose' (-v) on that command? Hopefully will point to reason.

Thanks,
Perry

Re: Login, get blank page

Posted: Tue Oct 05, 2021 3:38 pm
by murdock
* About to connect() to campusmon2v4.techservices.illinois.edu port 443 (#0)
* Trying 192.17.18.74...
* Connected to campusmon2v4.techservices.illinois.edu (192.17.18.74) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: CN=campusmon2.techservices.illinois.edu,OU=Urbana-Champaign Campus,O=University of Illinois,L=Urbana,ST=Illinois,C=US
* start date: Sep 13 00:00:00 2021 GMT
* expire date: Sep 13 23:59:59 2022 GMT
* common name: campusmon2.techservices.illinois.edu
* issuer: CN=InCommon RSA Server CA,OU=InCommon,O=Internet2,L=Ann Arbor,ST=MI,C=US
> POST //nagiosxi/api/v1/authenticate?pretty=1 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: campusmon2v4.techservices.illinois.edu
> Accept: */*
> Content-Length: 51
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 51 out of 51 bytes
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Tue, 05 Oct 2021 20:35:01 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
< X-Powered-By: PHP/5.4.16
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
< Content-Length: 0
< Connection: close
< Content-Type: application/json
<
* Closing connection 0

Re: Login, get blank page

Posted: Wed Oct 06, 2021 12:26 pm
by pbroste
Hello Rob,

Thanks for providing the details; we don't see anything other than the 500 error message. Not confident if specifying the SSL certificate on the curl would yield a different result.

We want to take a further look into the Apache configs, logs, and get the System Profile as well.

Code: Select all

tar -czvf /tmp/apachelogs.tar.gz /var/log/httpd/ /var/log/apache2/ /etc/httpd/logs/ /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/ 
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button

Please send the results via [PM] Private Message.

Thanks,
Perry

Re: Login, get blank page

Posted: Tue Oct 12, 2021 1:25 pm
by murdock
Hi Perry,

As indicated previously, logging in does NOT work; therefore I can't generate the System Profile in the web interface like you are asking for.

Please provide alternate instructions for generating the System Profile from the command line?

Rob

Re: Login, get blank page

Posted: Wed Oct 13, 2021 10:22 am
by pbroste
Hello Rob,

Thanks for pinging me on that, here it is:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile.zip
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send the resulting /usr/local/nagiosxi/var/components/profile.zip​ file via Private Message.

Thanks,
Perry

Re: Login, get blank page

Posted: Thu Oct 14, 2021 3:48 pm
by murdock
Message sent!

Re: Login, get blank page

Posted: Fri Oct 15, 2021 10:09 am
by pbroste
Hello Rob,

Thanks for sending the System Profile over, after review we see messages indicating login.php is hitting up Active Directory.
"GET / HTTP/1.1" 200 3245
"GET /nagiosxi/ HTTP/1.1" 302 27
"GET /nagiosxi/login.php?redirect=/nagiosxi/index.php%3f&noauth=1 HTTP/1.1" 200 27321
"POST /nagiosxi/login.php HTTP/1.1" 500 -
PHP Fatal error: Cannot redeclare class adLDAPException in /usr/local/nagiosxi/html/includes/components/active_directory/adLDAP/adLDAP.php on line 3031
We need to remove that and have you login with your local Admin and then setup the new AD/LDAP:

Code: Select all

mv /usr/local/nagiosxi/html/includes/components/active_directory /tmp/
Please let us know the results,
Perry

Re: Login, get blank page

Posted: Tue Oct 19, 2021 12:03 pm
by murdock
I replied to pbroste by dm...