Upgrade from 5.4.10 to 5.7.5 Fails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
genna
Posts: 34
Joined: Mon Aug 14, 2017 8:10 pm

Upgrade from 5.4.10 to 5.7.5 Fails

Post by genna »

myupgrade.log
Hi
I'm trying to upgrade from version 5.4.10 to 5.7.5 in offline mode.
The upgrade seem to fail - it doesn't explicitly say so on the screen but xi-upgrade.txt file ahs Fatal Error in it.
I have attached update.log and a on-screen output
Also it seems wants upgrade wants to install PHP 5.4 . Does version 5.7.5 still requires PHP 5.4. We have updated Nagios to run on PHP 5.6.
It would be a big issue for us if PHP 5.4 is still in use - we are not allowed to run it due to many security vulnerability issues
Before upgrade:

[root ~]# rpm -qa | grep php
rh-php56-php-snmp-5.6.25-1.el7.x86_64
rh-php56-php-pear-1.9.5-4.el7.noarch
rh-php56-php-process-5.6.25-1.el7.x86_64
rh-php56-php-5.6.25-1.el7.x86_64
rh-php56-php-gd-5.6.25-1.el7.x86_64
rh-php56-php-pgsql-5.6.25-1.el7.x86_64
rh-php56-php-ldap-5.6.25-1.el7.x86_64
rh-php56-php-mbstring-5.6.25-1.el7.x86_64
rh-php56-runtime-2.3-1.el7.x86_64
rh-php56-php-common-5.6.25-1.el7.x86_64
rh-php56-php-mysqlnd-5.6.25-1.el7.x86_64
rh-php56-php-cli-5.6.25-1.el7.x86_64
rh-php56-php-pecl-jsonc-devel-1.3.6-3.el7.x86_64
rh-php56-php-xml-5.6.25-1.el7.x86_64
rh-php56-php-pecl-jsonc-1.3.6-3.el7.x86_64
rh-php56-php-pdo-5.6.25-1.el7.x86_64
rh-php56-php-devel-5.6.25-1.el7.x86_64
[root ~]#

After Upgrade:
# rpm -qa | grep php
rh-php56-php-snmp-5.6.25-1.el7.x86_64
php-common-5.4.16-48.el7.x86_64
php-process-5.4.16-48.el7.x86_64
rh-php56-php-pear-1.9.5-4.el7.noarch
rh-php56-php-process-5.6.25-1.el7.x86_64
rh-php56-php-5.6.25-1.el7.x86_64
php-ldap-5.4.16-48.el7.x86_64
rh-php56-php-gd-5.6.25-1.el7.x86_64
rh-php56-php-pgsql-5.6.25-1.el7.x86_64
php-cli-5.4.16-48.el7.x86_64
php-pgsql-5.4.16-48.el7.x86_64
php-gd-5.4.16-48.el7.x86_64
php-pecl-ssh2-0.12-1.el7.x86_64
rh-php56-php-ldap-5.6.25-1.el7.x86_64
rh-php56-php-mbstring-5.6.25-1.el7.x86_64
php-5.4.16-48.el7.x86_64
php-mysql-5.4.16-48.el7.x86_64
php-snmp-5.4.16-48.el7.x86_64
php-mbstring-5.4.16-48.el7.x86_64
php-imap-5.4.16-9.el7.x86_64
rh-php56-runtime-2.3-1.el7.x86_64
rh-php56-php-common-5.6.25-1.el7.x86_64
rh-php56-php-mysqlnd-5.6.25-1.el7.x86_64
rh-php56-php-cli-5.6.25-1.el7.x86_64
rh-php56-php-pecl-jsonc-devel-1.3.6-3.el7.x86_64
php-xml-5.4.16-48.el7.x86_64
php-mssql-5.4.16-9.el7.x86_64
rh-php56-php-xml-5.6.25-1.el7.x86_64
rh-php56-php-pecl-jsonc-1.3.6-3.el7.x86_64
rh-php56-php-pdo-5.6.25-1.el7.x86_64
php-pdo-5.4.16-48.el7.x86_64
php-devel-5.4.16-48.el7.x86_64
php-pear-1.9.4-22.el7.noarch
rh-php56-php-devel-5.6.25-1.el7.x86_64



Thanks
Genna Reingold
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Upgrade from 5.4.10 to 5.7.5 Fails

Post by vtrac »

Hi genna,
The error in your xi-upgrade log said that "xi.key" was empty.

Can you please try the followings:

Code: Select all

mkdir /usr/local/nagiosxi/var/keys
chown -R nagios:nagios /usr/local/nagiosxi/var/keys
chmod 775 /usr/local/nagiosxi/var/keys
openssl rand -hex 16 > /usr/local/nagiosxi/var/keys/xi.key
chown nagios:nagios /usr/local/nagiosxi/var/keys/xi.key
chmod 640 /usr/local/nagiosxi/var/keys/xi.key
NOTE:
You might have to re-enter your license information (including the license key) in Admin > License Information.

Restart nagios:

Code: Select all

systemctl restart nagios
As to php, looks like XI 5.7.5 came with PHP v5.4


Regards,
Vinh
genna
Posts: 34
Joined: Mon Aug 14, 2017 8:10 pm

Re: Upgrade from 5.4.10 to 5.7.5 Fails

Post by genna »

Hi Vinh,
The install was mostly successful after that. Had some issue with duplicate nagcmd entries in /etc/groups but this is due to our external user/group management software on the VM and I can fix it manually. I can see version 5.7.5 on Web UI so presumably it's all good.

In relation to PHP .54 - is is safe to uninstall ( considering Nagios Xi 5.4.10 was running on PHP 5.6) or do we need to do some extra steps?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Upgrade from 5.4.10 to 5.7.5 Fails

Post by vtrac »

Hi genna,
Here's the instruction for upgrade to PHP 7:
https://support.nagios.com/kb/article/n ... 7-860.html

If possible, please take a snapshot of your VM before doing the upgrade .... just in-case you need to revert back.


Regards,
Vinh
Locked