Page 1 of 2

Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Error)

Posted: Thu Jan 07, 2016 9:05 am
by philip.ianni
I had posted this last week, It seems my post was deleted.

Updating our XI instance from 2014R2.7 to 5.2.3 failed both via GUI and in the CLI.

Lots of PHP msgs like the below:

Code: Select all

PHP Warning: require_once(/data/nagiosxi/html/includes/utils-reports-export.inc.php): failed to open stream: Permission denied in /data/nagiosxi/html/includes/utils.inc.php on line 38, referer:
Followed the instructions here:

https://support.nagios.com/forum/viewto ... 16&t=35730

Some things were fixed (could access basic GUI) however there were still some permission errors in logs and parts of GUI were broken. I tried for about an hour constantly fixing whatever permissions errors I could find but more kept appearing so I pretty much gave up.

Here is our update log.

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Thu Jan 07, 2016 12:41 pm
by rkennedy
Can you post a couple configurations for us to take a look at -

Code: Select all

/etc/httpd/conf.d/nagios.conf
/etc/httpd/conf.d/nagiosxi-api.conf
/etc/httpd/conf.d/nagiosxi.conf
Also, please run the following commands and post the output after trying to load the XI page.

Code: Select all

tail -n100 /var/log/httpd/ssl_error_log
tail -n100 /var/log/httpd/ssl_access_log
tail -n100 /var/log/httpd/error_log
tail -n100 /var/log/httpd/access_log

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Thu Jan 07, 2016 1:23 pm
by philip.ianni
I unfortunately rolled back to our backup given the errors.

I'm assuming you wanted the tails of the system that failed to update. Is it possible to upgrade the server without being attached to the internet? Im thinking of bringing up a clone with no network, upgrading to get you the logs you're requesting.

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Thu Jan 07, 2016 5:02 pm
by tmcdonald
How was this server originally installed? Was it installed online then moved offline? What about the OS, version, and whether it is a minimal/server/desktop install?

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Thu Jan 07, 2016 8:43 pm
by brandon.pal
tmcdonald wrote:How was this server originally installed? Was it installed online then moved offline? What about the OS, version, and whether it is a minimal/server/desktop install?
Original install was the VMWare image downloaded from the XI website.

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Fri Jan 08, 2016 1:52 pm
by tgriep
Do you have LDAP or Active Directory setup on the server for the UNIX logins?
Have you setup the server to use a proxy server?
Can you post your /etc/sudoers file so we can review it?

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Fri Jan 08, 2016 4:54 pm
by philip.ianni
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Mon Jan 11, 2016 11:32 am
by brandon.pal
tgriep wrote:Do you have LDAP or Active Directory setup on the server for the UNIX logins?
Have you setup the server to use a proxy server?
Can you post your /etc/sudoers file so we can review it?
No LDAP/AD and no proxy server.

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Mon Jan 11, 2016 2:03 pm
by hsmith
philip.ianni wrote:I'm assuming you wanted the tails of the system that failed to update. Is it possible to upgrade the server without being attached to the internet? Im thinking of bringing up a clone with no network, upgrading to get you the logs you're requesting.
We do have an offline tarball located at https://repo.nagios.com.

I'm sorry if I'm a little bit confused, but since you rolled back what would you like assistance with at this point, cloning the server?

Re: Nagios XI Upgrade from 2014R2.7 to 5.2.3 Failed (PHP Err

Posted: Tue Jan 12, 2016 9:02 am
by philip.ianni
If cloning the server then attempting to update to get the required logs will help troubleshoot the failure then yes, we're wondering if the upgrade process is possible without internet access. (my assumption is no, seeing as a it performs a yum update) but I was wondering if you could confirm.