5.8.7 offline install fails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
WillH
Posts: 54
Joined: Mon Aug 03, 2020 10:37 am

5.8.7 offline install fails

Post by WillH »

Situation: I have some servers in an isolated environment that cannot talk to the interwebs by design
RHEL 7

Downloaded the offline xi install from https://repo.nagios.com/?repo=offline (nagiosxi-5.8.7-1.el7.x86_64.tar.gz)
tar xzf to /tmp/rpms as instructed
Ran fullinstall
install failed to complete, but no messages to say so.

I found the xi-install file, which tells me:
MySQL not yet installed - that's okay.
Running './2-usersgroups'...
Adding users and groups...
useradd: user 'nagios' already exists
usermod: no changes
groupadd: group 'nagios' already exists
groupadd: group 'nagcmd' already exists
Users and groups added OK
RESULT=0
Running './3-dbservers'...
ERROR: MySQL not installed - exiting.
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './3-dbservers'
I cannot find the install.log file (which on a "normal" install would be in /tmp/nagiosxi) anywhere on the system, using the find and the locate commands as root.

Any suggestions?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: 5.8.7 offline install fails

Post by ssax »

Please send us the full output from the top or the full /tmp/xi-install log file (interesting you don't have it).

What is the output of this command?

Code: Select all

yum repolist
Make sure you have RHEL base, optional, and epel repositories enabled and accessible.
WillH
Posts: 54
Joined: Mon Aug 03, 2020 10:37 am

Re: 5.8.7 offline install fails

Post by WillH »

This is all that is in the log file :(

From the first server we've tried
http://repo.nagios.com/nagiosxi-deps/7/ ... repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2600:3c00::f03c:92ff:fef7:45ce: Network is unreachable"
Trying other mirror.
rhel-7-server-extras-rpms/x86_64 | 2.0 kB 00:00:00
rhel-7-server-optional-rpms/7Server/x86_64 | 2.0 kB 00:00:00
rhel-7-server-rh-common-rpms/7Server/x86_64 | 2.1 kB 00:00:00
rhel-7-server-rpms/7Server/x86_64 | 2.0 kB 00:00:00
rhel-7-server-satellite-tools-6.9-rpms/x86_64 | 2.1 kB 00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64 | 2.0 kB 00:00:00
rhel-server-rhscl-7-rpms/7Server/x86_64 | 2.0 kB 00:00:00
repo id repo name status
nagios-base Nagios 0
nagiosxi-deps Nagios XI Dependencies 0
rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 1,406
rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 23,102
rhel-7-server-rh-common-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - RH Common (RPMs) 243
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 32,317
rhel-7-server-satellite-tools-6.9-rpms/x86_64 Red Hat Satellite Tools 6.9 (for RHEL 7 Server) (RPMs) 70
rhel-7-server-supplementary-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Supplementary (RPMs) 419
rhel-server-rhscl-7-rpms/7Server/x86_64 Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server 13,578
repolist: 71,135


I'll pull from the other serve as soon as I can, but the jump servers are in a patch cycle this morning
WillH
Posts: 54
Joined: Mon Aug 03, 2020 10:37 am

Re: 5.8.7 offline install fails

Post by WillH »

OK, second server, same xi-install.log with the info provided

repolist is
Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos, subscription-managerrepo id repo name status!rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 1,406!rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 23,102!rhel-7-server-rh-common-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - RH Common (RPMs) 243!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 32,317!rhel-7-server-satellite-tools-6.9-rpms/x86_64 Red Hat Satellite Tools 6.9 (for RHEL 7 Server) (RPMs) 70!rhel-7-server-supplementary-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Supplementary (RPMs) 419!rhel-server-rhscl-7-rpms/7Server/x86_64 Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 13,578repolist: 71,135
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: 5.8.7 offline install fails

Post by ssax »

The offline installer is not a true offline installer, it still needs access to the packages it needs via repos.

I do not see the epel repo enabled, the system will likely need access to that as well either through the FW, local respository, mounted via DVD, or manually installing the required packages.

If it has access through the firewall you can do this:

Code: Select all

yum install epel-release
If not, you'd likely need to mirror it or manually install whatever it complains about:

https://docs.fedoraproject.org/en-US/epel/#_el8

The exclamation points next to the repos from the 2nd output means there is something wrong with them or the cache.

Run these commands on them as root/sudo:

Code: Select all

yum clean all
yum check-update
Then send fresh output of this:

Code: Select all

yum repolist
WillH
Posts: 54
Joined: Mon Aug 03, 2020 10:37 am

Re: 5.8.7 offline install fails

Post by WillH »

Thanks Sean, I'l see what I can get our engineers to do.
Any idea where the rpm/yum version of the install would put the full install.log?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: 5.8.7 offline install fails

Post by ssax »

It should be going to /tmp/xi-install.log.

Are you running it as root or sudo?

What is the output of this?

Code: Select all

find / -name xi-install.log
You can see from the RPM postinstall scriptlet below that it should be trying to go to /tmp/xi-install.log:

Code: Select all

[root@xir nagiosxi]# rpm -q --scripts nagiosxi
preinstall scriptlet (using /bin/sh):
rm -rf /tmp/nagiosxi
postinstall scriptlet (using /bin/sh):

#openldap mods
mkdir -p /etc/openldap/cacerts
chown apache.nagios /etc/openldap /etc/openldap/certs /etc/openldap/cacerts /etc/openldap/ldap.conf
/usr/bin/chmod 664 /etc/openldap/ldap.conf
/usr/bin/chmod 775 /etc/openldap /etc/openldap/certs /etc/openldap/cacerts

# Edit line in ldap config
sed -i 's/TLS_CACERTDIR/#TLS_CACERTDIR/g' /etc/openldap/ldap.conf
echo "TLS_CACERTDIR /etc/openldap/cacerts" >> /etc/openldap/ldap.conf

# Perform install
if [ "$1" = "1" ]; then

    (
        cd /tmp/nagiosxi
        /usr/bin/chmod +x ./rpminstall
        touch install.log
        ./rpminstall > /tmp/xi-install.log 2>&1
        rm -rf /tmp/xi*_backup
    )

# Perform upgrade
elif [ "$1" = "2" ]; then

    (
        cd /tmp/nagiosxi
        /usr/bin/chmod +x ./rpmupgrade
        touch install.log
        ./rpmupgrade > /tmp/xi-upgrade.log 2>&1
    )

fi

# remove installation files
rm -rf /tmp/nagiosxi
WillH
Posts: 54
Joined: Mon Aug 03, 2020 10:37 am

Re: 5.8.7 offline install fails

Post by WillH »

Sean,
All that we get is in the text I attached, though it references install.log
Is this an artifact of the standard install process?
As it stands I don't have enough error data to say what in the mysql portion of the install has failed :(
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: 5.8.7 offline install fails

Post by pbroste »

Hello @WillH

I am following up on the behalf of @ssax as he is out of the office this week.

From the previous post update, it appears that you trying to figure out what is failing on the./fullinstall during the database install. Appears that you are not finding anything written to '/tmp/xi-install.log'.

Several options to find out where it is failing:
  • run the ./fullinstall | tee /tmp/results.txt
  • [list]
  • Probably will not see much though
[*]Option to change the #!/bin/bash -e heading in the script that you want to watch to #!/bin/bash -x[/*]
  • Change directory to the 'nagiosxi' install directory
    • To find all and change all: find . -type f -exec sed -i 's/bash -e/bash -x/g' {} +
[/list]

Run through the ./fullinstall with script info to see where it stalls out.

Thanks,
Perry
Locked