Page 1 of 2

NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Mon Oct 12, 2015 8:17 am
by ssa_nagios
I'm having problems getting nagiosxi up and running again after attempt to upgrade to 5.2. Getting the following error

/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&username=XXXXXXXXX&password=XXXXXXXXX' -O nagiosql.login--2015-10-12 09:14:40-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2015-10-12 09:14:40 ERROR 500: Internal Server Error.

I'm using the Nagiosxi Linux Source installer

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Mon Oct 12, 2015 1:15 pm
by ssax
What is the output of this command:

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/components/ccm/
Also, please attach or PM your /etc/httpd/conf/httpd.conf file and your /etc/httpd/conf.d directory so that we can review them.

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Tue Oct 13, 2015 8:35 am
by ssa_nagios

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/components/ccm/
total 172
-rw-r-----. 1 nagios nagios 10317 Oct 13 07:22 ajax.php
-rw-r-----. 1 nagios nagios   623 Jul  2  2014 BUGS.txt
-rw-r-----. 1 nagios nagios 20085 Oct 13 07:22 ccm.inc.php
-rw-r-----. 1 nagios nagios 18505 Jul  2  2014 ccm.jpg
-rw-------. 1 nagios nagios 21912 Oct 13 07:22 ccm-splash.inc.php
-rw-r-----. 1 nagios nagios 10803 Oct 13 07:22 CHANGES.txt
drwxr-x---. 2 nagios nagios  4096 Jul  2  2014 classes
-rw-r-----. 1 nagios nagios  5180 Oct 13 07:22 command_test.php
-rw-r-----. 1 nagios nagios  1470 Oct 13 07:22 config.inc.php
drwxr-x---. 2 nagios nagios  4096 Aug  5  2014 css
-rw-r-----. 1 nagios nagios  4130 Oct 13 07:22 download.php
drwxr-x---. 2 nagios nagios  4096 Oct 13 07:22 images
drwxr-x---. 2 nagios nagios  4096 Oct 13 07:22 includes
-rw-r-----. 1 nagios nagios  3848 Oct 13 07:22 index.php
drwxr-x---. 2 nagios nagios  4096 Jul  2  2014 javascript
-rw-------. 1 nagios nagios  4128 Oct 13 07:22 LICENSE.txt
-rw-r-----. 1 nagios nagios    59 Jul  2  2014 NOTES.txt
drwxr-x---. 2 nagios nagios  4096 Sep  3  2014 page_templates
-rw-r-----. 1 nagios nagios  4577 Oct 13 07:22 sanity.sh
drwxr-x---. 3 nagios nagios  4096 Jul  2  2014 templates
-rw-r-----. 1 nagios nagios   413 Jul  2  2014 TODO.txt
-rw-r-----. 1 nagios nagios  1871 Oct 13 07:22 xi-index.php

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Tue Oct 13, 2015 3:28 pm
by tgriep
Can you run this tail command, generate the error and post the output of the tail?

Code: Select all

tail -f /var/log/httpd/error_log
Thanks

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Wed Oct 14, 2015 2:54 pm
by ssa_nagios
Here is the tail of the error_logs file

ludes/components/bbbmap/
[Wed Oct 14 15:46:53 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:47:23 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:47:53 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:48:23 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:48:53 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:49:23 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:49:53 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:50:23 2015] [error] [client xx.xx.xx.xx] PHP Notice: Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbbmap/bbbmap.inc.php on line 232, referer: http://nsc-prd-nagiosxi-006.ba.ssa.gov/ ... ts/bbbmap/
[Wed Oct 14 15:51:02 2015] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant COMPONENT_REQUIRES_VERSION - assumed 'COMPONENT_REQUIRES_VERSION' in /usr/local/nagiosxi/html/includes/components/actions/actions.inc.php on line 33
[Wed Oct 14 15:51:02 2015] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant COMPONENT_REQUIRES_VERSION - assumed 'COMPONENT_REQUIRES_VERSION' in /usr/local/nagiosxi/html/includes/components/alertstream/alertstream.inc.php on line 33
[Wed Oct 14 15:51:08 2015] [notice] caught SIGTERM, shutting down
[Wed Oct 14 15:51:09 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Wed Oct 14 15:51:09 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Oct 14 15:51:09 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Oct 14 15:51:09 2015] [notice] Digest: done
[Wed Oct 14 15:51:10 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[/etc/httpd/logs]#

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Wed Oct 14, 2015 7:42 pm
by Box293
ssa_nagios wrote:[Wed Oct 14 15:51:09 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
It looks like SELinux is enabled which can cause problems.

Ruin these commands to make it permissive:

Code: Select all

sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
setenforce 0
Does this help?

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Thu Oct 15, 2015 9:19 am
by ssa_nagios
Box293 wrote:
ssa_nagios wrote:[Wed Oct 14 15:51:09 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
It looks like SELinux is enabled which can cause problems.

Ruin these commands to make it permissive:

Code: Select all

sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
setenforce 0
Does this help?

This didn't work as selinux was already set to permissive.

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Thu Oct 15, 2015 1:56 pm
by tmcdonald
What directory are you running the upgrade from? There should be an upgrade.log file there, please post or PM it.

Update: File received and placed in shared directory.

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Thu Oct 15, 2015 2:42 pm
by ssa_nagios
tmcdonald wrote:What directory are you running the upgrade from? There should be an upgrade.log file there, please post or PM it.
upgrade.log file sent to tmcdonald via PM

Re: NAGIOSQL LOGIN FAILED - NAGIOSXI upgrade to 5.2

Posted: Fri Oct 16, 2015 12:02 pm
by tgriep
Do you have a proxy server setup on the system?