Upgrade failure from 5.4.11 to 5.6.9

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
avocette
Posts: 17
Joined: Wed Sep 19, 2018 6:20 pm

Upgrade failure from 5.4.11 to 5.6.9

Post by avocette »

We're running Nagios XI 5.4.11 on Redhat 7 and are ultimately looking to move to a new Ubuntu server and update to the latest Nagios XI on that new server. Since we can't install XI 5.4.11 on the new server to do the move, we're upgrading to the latest on our existing server and will then do the migration.

When we try the upgrade from the GUI on the existing server, we get the following:

---- Starting Nagios XI Backup ----
No entry for terminal type "unknown";
using dumb terminal settings.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/share/perfdata/MCFD_-_MSSQL_Prod_DB_server_-_Pyramid: file changed as we read it
tar: /usr/local/nagios/share/perfdata/MCFD_-_Edsel.idir.bcgov: file changed as we read it
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
tar: /usr/local/nagiosxi/var/event_handler.lock: File removed before we read it
tar: /usr/local/nagiosxi/var: file changed as we read it
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
Backing up cronjobs for Apache...
Backing up logrotate config files...
Backing up Apache config files...
Compressing backup...

===============
BACKUP COMPLETE
===============
Backup stored in /store/backups/nagiosxi/autoupgrade_backup.1578096133.tar.gz

---- Starting Nagios XI Upgrade ----
Cleaning up temp directory...
No entry for terminal type "unknown";
using dumb terminal settings.
Nagios XI Upgrade Log
==========================
DATE: Fri Jan 3 16:09:05 PST 2020

DISTRO INFO:
RedHatEnterpriseServer
7.3
x86_64


No entry for terminal type "unknown";
using dumb terminal settings.
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib64/php/modules/ixed.5.4.lin
Sourceguardian extension found for PHP version 5.4
Sourceguardian extension already in php.ini
No entry for terminal type "unknown";
using dumb terminal settings.
Checking required prereqs...
Please wait...

OLD VERSION: 5411
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Resolving Dependencies
--> Running transaction check
---> Package nagios-repo.noarch 0:7-2.el7 will be updated
---> Package nagios-repo.noarch 0:7-4.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
nagios-repo noarch 7-4.el7 nagios-base 6.0 k

Transaction Summary
================================================================================
Upgrade 1 Package

Total size: 6.0 k
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/nagios-base/packages/nagios-repo-7-4.el7.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID c62934a0: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NAGIOS


The GPG keys listed for the "Nagios" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


Failing package is: nagios-repo-7-4.el7.noarch
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NAGIOS
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by tacolover101 »

check out this post by @lmiltchev to manually update the repo, it should solve your problem:
https://support.nagios.com/forum/viewto ... 48#p248963
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by lmiltchev »

Thanks @tacolover101!

@avocette, let us know if you were able to resolve your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
avocette
Posts: 17
Joined: Wed Sep 19, 2018 6:20 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by avocette »

That got me further - it now seems to go through the process. The log gets to about 12000 lines and then I see this:

libnpcommon.a(sslutils.o): In function `np_net_ssl_init_with_hostname_version_and_cert':
/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins/sslutils.c:125: undefined reference to `TLS_client_method'
/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins/sslutils.c:151: undefined reference to `SSL_CTX_set_options'
/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins/sslutils.c:129: undefined reference to `OPENSSL_init_ssl'
/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins/sslutils.c:130: undefined reference to `OPENSSL_init_ssl'
/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins/sslutils.c:131: undefined reference to `OPENSSL_init_crypto'
libnpcommon.a(sslutils.o): In function `np_net_ssl_check_cert':
/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins/sslutils.c:235: undefined reference to `X509_getm_notAfter'
collect2: error: ld returned 1 exit status
make[2]: *** [check_http] Error 1
make[2]: Leaving directory `/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1'
make: *** [all] Error 2


I tried through the Web UI and also ran:

wget -O upgrade.sh https://assets.nagios.com/downloads/nagiosxi/upgrade.sh
sh ./upgrade.sh

and the results were the same. Let me know if there's anything else you need to see in the log - I didn't think posting the whole thing would be helpful...

Thanks,
Scott
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by lmiltchev »

Are you using the "default" version of openssl, provided by the OS or you upgraded the openssl packages? What is the output of the command below?

Code: Select all

dpkg -l | grep openssl
Some users reported that they were able to solve "similar" issues by installing the libssl1.0-dev package on their systems. You could run running:

Code: Select all

apt-get install libssl1.0-dev
then rerun the upgrade script.

Update: If you haven't migrated to the Ubuntu machine yet, and you are still using RHEL 7, run:

Code: Select all

yum list installed | grep openssl
and show the output. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
avocette
Posts: 17
Joined: Wed Sep 19, 2018 6:20 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by avocette »

Those commands don't seem to work (because we're on Red Hat 7, I assume, but I ran openssl version and got:

1.1.1b 26 Feb 2019

It clearly must have been upgraded at some point but we don't have any real knowledge of what's been done with this system, though it's clear it mostly hasn't been patched for a couple of years.

I tried:

yum install libssl1.0-dev and it didn't find such a package. I then tried:

yum install openssl-devel and it said "Nothing to do".

We lack Linux expertise (hopefully this is still within the bounds of support here). Any suggestions on this?

Thanks,
Scott
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by lmiltchev »

Instead of trying to upgrade your existing Nagios XI instance, try the following:

1. Backup your "old" Nagios XI system by running from the command line:

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh
Make sure you don't have any config errors/issues first, andrReview our documentation on backing up and restoring Nagios XI before proceeding with these instructions.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

2. Install Nagios XI 5.6.9 on your "new" Ubuntu server.

3. Copy over the backup of your "old" server to the "new" one.

4. Restore from the backup by running the following command on the "new" server:

Code: Select all

/usr/local/nagiosxi/scripts/restore_xi.sh </full/path/to/backupfile.tar.gz>
5. The command above will restore your XI configs, but also will revert you back to XI 5.4.11, so you would need to go to your original download directory (for XI 5.6.9), and rerun the upgrade:

Code: Select all

cd /tmp/nagiosxi
./upgrade
6. Once you upgraded to 5.6.9, you would also need to run the commands below (as you are changing the operating system):

Code: Select all

cd /tmp/
wget https://assets.nagios.com/downloads/nagiosxi/scripts/restore_repair.sh
chmod +x restore_repair.sh
./restore_repair.sh
If you are still not able to upgrade at this point, please open a support ticket via our support center here:

https://support.nagios.com/tickets/

A remote session may be necessary to further troubleshoot the issue. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
avocette
Posts: 17
Joined: Wed Sep 19, 2018 6:20 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by avocette »

Will it definitely work when it goes back to 5.4.11 on the old server? Our first method was to install 5.4.11 on the new Ubuntu server but it said the versions couldn't be installed as it was too old (I forget the actual wording but it was something along thoise lines).

Thanks,
Scott
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade failure from 5.4.11 to 5.6.9

Post by lmiltchev »

Yes, this is the reason why you would need to go this route. The version of XI that you are currently using is quite old. Ideally, you would install the same version of XI on the "new" server, then restore from a backup, then upgrade, but since this version is too old, we will need to change the method. According to our developers, this should work. We will help you with the upgrade if you run into some issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked