Upgrade to 5.2.0 - HTTP 500 Internal Server Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Upgrade to 5.2.0 - HTTP 500 Internal Server Error

Post by aap »

Hi,

After upgrading to version 5.2.0 manually using the source installer, I am now unable to log on to our Nagios XI system.

Upgrade log is attached. Login page appears however after inserting credentials, the page cannot be displayed page appears. HTTP 500 Internal Server Error.

Please assist. This is our production system. There is a backup of the former version but I'd rather not revert.

This is the tail of /var/log/httpd/error_log

[Sat Oct 17 18:39:03 2015] [error] [client 10.127.203.208] 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, referer: http://nagiosxi.xxxxxxxx/nagiosxi//incl ... ain.php?&=
[Sat Oct 17 18:39:03 2015] [error] [client 10.127.203.208] 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, referer: http://nagiosxi.xxxxxxxx/nagiosxi//incl ... ain.php?&=
[Sat Oct 17 18:39:03 2015] [error] [client 10.127.203.208] PHP Notice: Use of undefined constant COMPONENT_REQUIRES_VERSION - assumed 'COMP

Your prompt attention is appreciated.
You do not have the required permissions to view the files attached to this post.
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error

Post by mp4783 »

I noticed at the end of the file that there appears to have been another upgrade attempt that was cancelled. I'm not sure what, if any, changes might have been made prior to it being cancelled.

If you have not already done so, check the following logs:

/etc/httpd/logs/error_log
/etc/httpd/logs/ssl_error_log
/var/log/mysqld.log
/var/log/messages
/usr/local/nagios/var/nagios.log

Make sure all of the required processes are up and running. Here's a listing of the relevant processes on my RHEL 6 server:

Code: Select all

nagios   21611 21607  0 17:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   21613 21606  0 17:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   21610 21605  0 17:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   21615 21604  0 17:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   21609 21608  0 17:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
root     28312     1  0 Oct16 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/m5labtestvm03.pid
root     21771 15648  0 17:18 pts/0    00:00:00 grep -e nagios -e httpd -e mysql -e ajax -e worker
ajaxterm 28566     1  0 Oct16 ?        00:00:33 python /usr/share/ajaxterm/ajaxterm.py --daemon --port=8022 --uid=ajaxterm
nagios   21617 21611  0 17:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   21619 21613  0 17:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios   21618 21610  0 17:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php
nagios   21624 21615  0 17:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php
nagios   21621 21609  0 17:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
nagios   28596     1  0 Oct16 ?        00:00:51 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   28622 28596  0 Oct16 ?        00:00:07 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   28598 28596  0 Oct16 ?        00:00:01 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   28599 28596  0 Oct16 ?        00:00:01 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   28600 28596  0 Oct16 ?        00:00:01 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   28601 28596  0 Oct16 ?        00:00:01 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   28602 28596  0 Oct16 ?        00:00:01 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   28603 28596  0 Oct16 ?        00:00:01 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   28295     1  0 Oct16 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   28605 28295  0 Oct16 ?        00:00:09 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   28606 28605  0 Oct16 ?        00:01:33 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   28279     1  0 Oct16 ?        00:00:13 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
apache   17008 28545  0 17:00 ?        00:00:02 /usr/sbin/httpd
apache   17011 28545  0 17:00 ?        00:00:01 /usr/sbin/httpd
apache   17017 28545  0 17:00 ?        00:00:01 /usr/sbin/httpd
apache   17293 28545  0 17:01 ?        00:00:01 /usr/sbin/httpd
apache    9733 28545  0 03:46 ?        00:00:21 /usr/sbin/httpd
apache    9734 28545  0 03:46 ?        00:00:36 /usr/sbin/httpd
apache    9735 28545  0 03:46 ?        00:00:36 /usr/sbin/httpd
apache    9736 28545  0 03:46 ?        00:00:36 /usr/sbin/httpd
apache    9741 28545  0 03:46 ?        00:00:36 /usr/sbin/httpd
apache    9743 28545  0 03:46 ?        00:00:36 /usr/sbin/httpd
apache    9744 28545  0 03:46 ?        00:00:34 /usr/sbin/httpd
apache    9745 28545  0 03:46 ?        00:00:36 /usr/sbin/httpd
root     28545     1  0 Oct16 ?        00:00:05 /usr/sbin/httpd
mysql    28492 28312  0 Oct16 ?        00:13:17 /usr/sbin/mysqld --basedir=/usr --datadir=/usr/local/mysql/data --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/usr/local/mysql/data/m5labtestvm03.pid --socket=/var/lib/mysql/mysql.sock
If you have a known login to the MySQL database, attempt to log in at the command line via the mysql client:

Code: Select all

mysql -u root -p


It's possible that the MySQL database didn't get migrated properly and thus any login credentials stored within it might not be there.

Good luck.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error

Post by Box293 »

Thanks for the ideas @mp4783.

This is very strange.

Have you tried re-running the upgrade from the command line again?

Just to be safe, follow these procedures in this guide:

https://assets.nagios.com/downloads/nag ... nstall.pdf

It could be possible that you extracted the upgrade at the command line and it extracted it into a directory containing a previous version of XI which may have caused issues. Just a stab in the dark.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error

Post by aap »

Thanks for all your suggestions.

I have tried the manual installation again after deleting the old extracted folder and I get exactly the same results.

Nagios XI itself is still functioning as we continue to receive notifications however, we are unable to login.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error

Post by tgriep »

Can you run the following tail command in a shell on the Xi system, try to login to the GUI and post the output of the tail?

Code: Select all

tail -f /var/log/httpd/error_log
Are you using LDAP authentication on the XI system?
Be sure to check out our Knowledgebase for helpful articles and solutions!
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error

Post by aap »

Please close this one.

Issue was with a broken symlink not related to the upgrade per se.

Thanks for your help Sean
Locked