NAGIOSQL LOGIN Failed! Returncode = 2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mmcswain
Posts: 1
Joined: Sat Sep 02, 2017 11:17 am

NAGIOSQL LOGIN Failed! Returncode = 2

Post by mmcswain »

I see this in the logs, and the configuration command never completes. Forgive me if this has been covered, but I did not find an answer in the forum.

............................PROCESSING COMMAND ID 48...
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-09-02 11:15:31-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://localhost/nagiosxi/includes/components/ccm/ [following]
--2017-09-02 11:15:31-- https://localhost/nagiosxi/includes/components/ccm/
Connecting to localhost (localhost)|::1|:443... connected.
WARNING: cannot verify localhost's certificate, issued by ‘/C=US/ST=Texas/L=Houston/O=Friedkin Information Technology/CN=tfg-aws-nagios.fitsvcs.com’:
Self-signed certificate encountered.
WARNING: certificate common name ‘tfg-aws-nagios.fitsvcs.com’ doesn't match requested host name ‘localhost’.
HTTP request sent, awaiting response... 302 Found
Location: https://localhost/nagiosxi/login.php?re ... f&noauth=1 [following]
--2017-09-02 11:15:32-- https://localhost/nagiosxi/login.php?re ... f&noauth=1
Reusing existing connection to [localhost]:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

0K .......... .......... ..... 3.34M=0.008s

2017-09-02 11:15:32 (3.34 MB/s) - ‘nagiosql.login’ saved [26418]

/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=gHDndV' -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=gHDndV' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NAGIOSQL LOGIN Failed! Returncode = 2

Post by scottwilkerson »

can you post the contents of this file
/usr/local/nagiosxi/var/nagiosql.login

Also, at the very least I believe you missed the following on page 8-9 of this setup guide for SSL
https://assets.nagios.com/downloads/nagiosxi/docs/Configuring-SSL-with-Nagios%20XI.pdf
Open the /usr/local/nagiosxi/html/config.inc.php file in vi by executing the following command:

Code: Select all

vi /usr/local/nagiosxi/html/config.inc.php
Find the following line:

Code: Select all

$cfg['use_https']=false;
Change it to:

Code: Select all

$cfg['use_https']=true;
Save the changes, you have finished editing this file.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked