Page 1 of 1
Upgrade to 5.2.0 - HTTP 500 Internal Server Error
Posted: Sat Oct 17, 2015 9:22 am
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.
Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error
Posted: Sun Oct 18, 2015 12:20 pm
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:
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.
Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error
Posted: Mon Oct 19, 2015 12:51 am
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.
Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error
Posted: Mon Oct 19, 2015 8:22 am
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.
Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error
Posted: Mon Oct 19, 2015 1:50 pm
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?
Are you using LDAP authentication on the XI system?
Re: Upgrade to 5.2.0 - HTTP 500 Internal Server Error
Posted: Wed Oct 28, 2015 2:57 am
by aap
Please close this one.
Issue was with a broken symlink not related to the upgrade per se.
Thanks for your help Sean