Page 1 of 1

Nagios offline install -- not offline? Still reaching to yum

Posted: Tue Jul 28, 2020 9:15 am
by brandondash
EDIT/TLDR: I didn't read the full offline instructions mandating that the offline install still needs access to the based RHEL repositories. After resolving that, the main problem is the lack of a php-imap package.

Following the instructions https://repo.nagios.com/?repo=offline found here, my upgrade from 5.4 to 5.7 is failing. The error appears to be related to mismatched (or unavailable) packages in my local yum repositories.

Code: Select all

Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: nagiosxi-shellinabox(x86-64) = 5.7.2-2.el7
           Available: nagiosxi-shellinabox-5.6.8-1.el7.x86_64 (mylocal-repository)
               nagiosxi-shellinabox(x86-64) = 5.6.8-1.el7
There is also a large stack of similar errors related to various php packages.

I need a workaround for this. The whole point of an offline install is to NOT reach out to absolutely anywhere.

ADDENDUM: I removed all repos from my yum config entirely so see what happened. Here is the error stack:

Code: Select all

Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: rsync
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: nagiosxi-nxti(x86-64) = 5.7.2-2.el7
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: ipa-mincho-fonts
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: ipa-pmincho-fonts
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: ipa-pgothic-fonts
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: nagiosxi-shellinabox(x86-64) = 5.7.2-2.el7
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: git
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: php-devel
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: net-snmp-perl
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: ipa-gothic-fonts
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: php-imap
ADDENDUM: I noticed at the bottom of the page it said offline install still needed access to baseline redhat repos, so I added them back in and kept the local repo out. Here is the final smaller set of errors:

Code: Select all

Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: php-imap
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: nagiosxi-nxti(x86-64) = 5.7.2-2.el7
Error: Package: nagiosxi-5.7.2-2.el7.x86_64 (/nagiosxi-5.7.2-2.el7.x86_64)
           Requires: nagiosxi-shellinabox(x86-64) = 5.7.2-2.el7

Re: Nagios offline install -- not offline? Still reaching to

Posted: Wed Jul 29, 2020 9:11 am
by ssax
That's the way the offline installer works, it still needs access to the base repos so that it can install the packages it needs for the base OS, whether that be from a local yum repo you setup or by mounting them via DVD.
Your server must have access to base repositories for both RedHat or CentOS either via a local repository, or mounted DVD's
Taken from here:

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

You're repos are missing the packages required which is why it's showing you the messages you are seeing.

What is the output of these commands?

Code: Select all

yum repolist
yum info php-imap

Re: Nagios offline install -- not offline? Still reaching to

Posted: Wed Jul 29, 2020 9:21 am
by brandondash
Directly from Redhat:

Code: Select all

PHP-IMAP is a module for PHP applications that use IMAP. The php-imap package contains a dynamic shared object that will add support for the IMAP protocol to PHP. However, this package is not available on RHEL7. Nevertheless, if you need to use php-imap, the source code is available in php-imap, but Red Hat will be unable to assist with any issues pertaining to this module.

Re: Nagios offline install -- not offline? Still reaching to

Posted: Wed Jul 29, 2020 9:25 am
by brandondash
Results from yum repolist:

Code: Select all

repo id                         repo name                               status
!rhel-optional               RHEL_7_optional-rpms             8,719+2,315
!rhel-repository            RHEL_7_rpms                           8,201+2,290
!rhel-supplementary     RHEL_7_supplementary-rpms    80+8
repolist: 17,000
Results from yum info php-imap:

Code: Select all

Error: No matching Packages to list

Re: Nagios offline install -- not offline? Still reaching to

Posted: Wed Jul 29, 2020 5:48 pm
by ssax
Those exclamation points mean you have issues with the repos, try running this command first:

Code: Select all

yum clean all
Then try upgrading again.

Thanks for including the output as well as that's the important part:

Code: Select all

Error: No matching Packages to list
That means the package is not available from any of your repos. Try running it again after running "yum clean all". If it still doesn't list anything send fresh output of the "yum repolist" command as you likely have issues accessing the repositories.

Please zip up and send me the files from /etc/yum.repos.d as well.

The packages need to be available for it to work.

Re: Nagios offline install -- not offline? Still reaching to

Posted: Thu Jul 30, 2020 2:27 pm
by brandondash
ssax,

Thank you for your time and patience. I went ahead and wiped out all RPMs for Nagios, Httpd, Php, and SNMP, then installed from scratch. It was less pain than fixing whatever was wrong. This can be locked.

Thank goodness for your backup and restore functionality!

Re: Nagios offline install -- not offline? Still reaching to

Posted: Fri Jul 31, 2020 11:37 am
by mbellerue
I'm glad you were able to get this resolved! I'll lock the thread.