Upgrading Nagios XI to 2014R1.4 fails during upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
DonB
Posts: 39
Joined: Mon Mar 11, 2013 3:26 pm

Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by DonB »

Support,

Current Version: 2012R2.9
Upgrading To: 2014R1.4
User Install Guide: http://assets.nagios.com/downloads/nagi ... nstall.pdf

I’m attempting to upgrade NagiosXI and I getting “NAGIOSQL LOGIN FAILED!” error during the upgrade, the upgrade stops and I no longer am able to access the application. Just to give a little history, based on the error I get. Several months ago I attempted to replace the different account passwords using “Reset Security Credentials”, but when I updated “Config Manager Backend Password” one of the engine broke, I think it was the monitor engine. But once I re-entered the default password n@gweb, it fixed my issue. I have upgraded NagiosXI after that time successfully, but I’m thinking the new upgrade today is replacing a lot more stuff, like the core. So I’m not sure if it’s a password issue or not, but I just wanted to give you some history that may or may not be related…

I did try a couple of password changes:
# reset the passwords in NagiosXI and set all the sub-system passwords (3 of them) to n@gweb
# reset nagiosxi account under CCM to n@gweb
# updated nagiosxi in htpasswd.users to n@gweb
# updated mysql root account back to default = nagiosxi
# Verified passwords in settings.php, config.inc.php, ndo2db.cfg (see attached)

Console output error

Code: Select all

Installing new PNP templates...
Updating init script...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/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=nagiosxi&password=n@gweb' -O nagiosql.login--2014-08-20 14:36:42--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2014-08-20 14:36:42 ERROR 500: Internal Server Error.

NAGIOSQL LOGIN FAILED!
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by abrist »

This sounds like an issue with the backend and https. It looks like you were attempting to force https, but our ssl doc used to be a bit misleading (fixed now).
You have declared use_https twice in config.inc.php. Remove the second declaration:

Code: Select all

$cfg['use_https']=false;  // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP
Additionally, can you double check that the following doc was followed?
http://assets.nagios.com/downloads/nagi ... s%20XI.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
DonB
Posts: 39
Joined: Mon Mar 11, 2013 3:26 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by DonB »

I updated config.inc.php and removed the second use_https declaration, but I'm still getting the same error message. I also went back and removed any ssl settings, removed the redirect to 443 and use_https=false. I wanted to make sure that I wasn't using any SSL connections during the upgrade. I attached the config files that configured http and https. I also verified that I'm using the http protocol in Nagios XI GUI: System Config and Config Manager Settings.
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by tmcdonald »

Can you post/PM your /var/log/httpd/error_log file? I want to see if it might have any entries for the 500 error you are seeing. Make sure you try to visit the page beforehand so if it is logging there is a fresh entry.
Former Nagios employee
DonB
Posts: 39
Joined: Mon Mar 11, 2013 3:26 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by DonB »

I've attached /var/log/httpd/error_log file. I started the upgrade at [Thu Aug 28 11:06:05 2014]
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by lmiltchev »

Can you run the following command and show us the output?

Code: Select all

ll /var/www/html/
Be sure to check out our Knowledgebase for helpful articles and solutions!
DonB
Posts: 39
Joined: Mon Mar 11, 2013 3:26 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by DonB »

I've attached the output for the ll list for /var/www/html/
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by abrist »

I see a bunch of permission denied errors in the apache log:
Permission denied in /usr/local/nagiosxi/html/includes/components/capacityplanning/capacityplanning.inc.php
Check the permissions on the file:

Code: Select all

ls -la /usr/local/nagiosxi/html/includes/components/capacityplanning/capacityplanning.inc.php
And also check your groups and accounts:

Code: Select all

grep nag /etc/group
chage -l nagios
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
DonB
Posts: 39
Joined: Mon Mar 11, 2013 3:26 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by DonB »

Hello abrist,

I checked the following settings and here are my results.
ls -la /usr/local/nagiosxi/html/includes/components/capacityplanning/capacityplanning.inc.php

Code: Select all

[root@nag etc]# ls -la /usr/local/nagiosxi/html/includes/components/capacityplanning/capacityplanning.inc.php
-rwxr-x---. 1 nagios nagios 15852 Mar  6 10:42 /usr/local/nagiosxi/html/includes/components/capacityplanning/capacityplanning.inc.php
grep nag /etc/group

Code: Select all

[root@nag etc]# grep nag /etc/group
nagios:x:50174:nagios,apache,nasmon
nagcmd:x:50175:nagios,apache
chage -l nagios

Code: Select all

[root@nag etc]# chage -l nagios
Last password change                                    : Jul 28, 2014
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Upgrading Nagios XI to 2014R1.4 fails during upgrade

Post by sreinhardt »

This is something that we should move to a remote session for. Could you send an email to [email protected] to schedule a remote session and get this all worked out. Based on the logs and files, looks like we have more than one issue going on here, and getting it corrected is probably going to be tricky.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked