Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by markmerchant »

Nagios XI upgrade failed during the 'make' step. Pls. advise, Thx.

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)

uname -a
Linux cvglqnagiosxx.xx.xxx 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 9 16:09:48 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

currently installed
Nagios XI 5.8.6

Error mesg
*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

make install-init
- This installs the init script in /etc/init.d

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.4.6'
/bin/install -c -m 755 -d -o root -g root /etc/init.d
/bin/install -c -m 755 -o root -g root startup/default-init /etc/init.d/nagios
Stopping nagios: No lock file found in /run/nagios.lock
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.

journalctl -xe oputput

Jan 12 10:27:40 cvglqnagios01.td.afg snmpd[1446]: Connection from UDP: [10.50.5.57]:54995->[10.50.4.228]:161
Jan 12 10:27:42 cvglqnagios01.td.afg sudo[1178]: nagios : TTY=unknown ; PWD=/home/nagios ; USER=root ; COMMAND=/usr/local/nagiosxi/scripts/manage_services.
Jan 12 10:27:42 cvglqnagios01.td.afg sudo[1178]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 12 10:27:42 cvglqnagios01.td.afg sudo[1178]: pam_unix(sudo:session): session closed for user root
Jan 12 10:27:42 cvglqnagios01.td.afg sudo[1186]: nagios : TTY=unknown ; PWD=/home/nagios ; USER=root ; COMMAND=/usr/local/nagiosxi/scripts/manage_services.
Jan 12 10:27:42 cvglqnagios01.td.afg sudo[1186]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 12 10:27:42 cvglqnagios01.td.afg sudo[1186]: pam_unix(sudo:session): session closed for user root
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by pbroste »

Hello @markmerchant

Thanks for reaching out, want to verify that you are running while logged into the 'root' superuser account and security services have been disabled.

Code: Select all

whoami

Code: Select all

sestatus
Please verify that the optional rpm's have been enabled:

Code: Select all

yum install -y yum-utils
yum-config-manager --enable rhel-7-server-optional-rpms

Code: Select all

yum group list
Looking for results:
Available Environment Groups:
...
Development Tools
...
Please let us know how things are looking.

Thanks,
Perry
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by markmerchant »

We don't use yum or rpms, package is downloaded w wget.

Here is what we have been using for several years now:

Code: Select all

# Upgrade NagiosXI
    cd /tmp
    rm -rf nagiosxi xi*.tar.gz
    wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
    tar xzf xi-latest.tar.gz
    cd nagiosxi
    ./upgrade
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by pbroste »

Hello @markmerchant

Thanks for following up, the 'upgrade' script uses yum and rpm to install see example search:
grep -Ei 'yum|rpm -e' upgrade | grep -Ei 'install -y|rpm -e'
yum install -y automake autoconf php-mbstring nmap subversion
yum install -y git
yum install -y python-futures
yum install -y --skip-broken bc dstat expat-devel mailx mod_ssl numpy openldap openldap-devel perl-Mail-IMAPClient perl-Net-DNS python-lxml pymssql python-simplejson rpmdevtools rrdtool-python sudo traceroute
yum install -y "@Japanese Support" "@Chinese Support" "@Korean Support"
yum install -y ipa-gothic-fonts ipa-mincho-fonts ipa-pgothic-fonts ipa-pmincho-fonts
rpm -e Ajaxterm
yum install -y shellinabox
rpm -e wkhtmltox
Want to find out exactly where it is failing looks like there is a missing dependency:

Code: Select all

yum repolist
uname -a
cat /etc/*release
yum list installed > /tmp/yumlist.txt
Let us know the results on:

Code: Select all

bash -x upgrade
Thanks,
Perry
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by markmerchant »

yum repolist
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-
: disabled-repos, subscription-manager
Repo pc_repo forced skip_if_unavailable=True due to: /etc/puppetlabs/puppet/ssl/private_keys/xxxnagios01.td.afg.pem
GAIG_EPEL_EPEL-el7-x86_64 13703/13703
GAIG_GAIHosting_GAIHosting-el7-x86_64 30/30
GAIG_Microsoft_Tools_Microsoft_Tools_EL7_x86_64 85/85
nagios-base 100/100
nagiosxi-deps 31/31
rhel-7-server-extras-rpms 1413/1413
rhel-7-server-optional-rpms 23205/23205
rhel-7-server-rh-common-rpms 243/243
rhel-7-server-rpms 32568/32568
rhel-7-server-supplementary-rpms 425/425
rhel-server-rhscl-7-rpms 13812/13812
repo id repo name status
!GAIG_EPEL_EPEL-el7-x86_64 EPEL-el7-x86_64 13,703
!GAIG_GAIHosting_GAIHosting-el7-x86_64 GAIHosting-el7-x86_64 30
!GAIG_Microsoft_Tools_Microsoft_Tools_EL7_x86_64 Microsoft Tools EL7 x86_ 85
!epel/x86_64 Extra Packages for Enter 13,712
!nagios-base Nagios 100
!nagiosxi-deps Nagios XI Dependencies 31
!pc_repo Puppet Labs puppet6 Repo 35
!rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 1,413
!rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 23,205
!rhel-7-server-rh-common-rpms/7Server/x86_64 Red Hat Enterprise Linux 243
!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 32,568
!rhel-7-server-supplementary-rpms/7Server/x86_64 Red Hat Enterprise Linux 425
!rhel-server-rhscl-7-rpms/7Server/x86_64 Red Hat Software Collect 13,812
repolist: 99,362
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager
2022-01-19 11:48:53,577 [WARNING] yum:22588:Dummy-1 @logutil.py:142 - logging already initialized
Cannot upload enabled repos report, is this client registered?

uname -a
Linux xxxnagios01.td.afg 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 9 16:09:48 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Red Hat Enterprise Linux Server release 7.9 (Maipo)

yum list installed > /tmp/yumlist.txt
Repo pc_repo forced skip_if_unavailable=True due to: /etc/puppetlabs/puppet/ssl/private_keys/xxxnagios01.td.afg.pem
2022-01-19 11:52:13,750 [WARNING] yum:23916:Dummy-1 @logutil.py:142 - logging already initialized
Cannot upload enabled repos report, is this client registered?
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by pbroste »

Hello @markmerchant

Thanks for following up with the details, was wondering where the 'bash -x upgrade' failed or stopped on?

Also, when you run 'yum update' what do you get for results?

Thanks,
Perry
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by markmerchant »

last few lines of upgrade.log

*** Exfoliation theme installed ***
NOTE: Use 'make install-classicui' to revert to classic Nagios theme

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.4.6'
make install-basic
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.4.6'
/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/archives
/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/spool/checkresults
chmod g+s /usr/local/nagios/var/spool/checkresults

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

make install-init
- This installs the init script in /etc/init.d

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.4.6'
/bin/install -c -m 755 -d -o root -g root /etc/init.d
/bin/install -c -m 755 -o root -g root startup/default-init /etc/init.d/nagios
Stopping nagios: No lock file found in /run/nagios.lock
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by pbroste »

Hello @markmerchant

Thanks for following up with the detail on the upgrade results, from the last line it appears that it is stops

Code: Select all

grep -Ei 'nagios.lock' /usr/local/nagios/etc/nagios.cfg
Should see this:
lock_file=/var/run/nagios.lock
Is there a 'nagios' process and service running:

Code: Select all

ps -aux | grep -Ei 'nagios.cfg && systemctl status nagios
Should see the 'nagios' PID in the '/run/nagios.lock':

Code: Select all

less /run/nagios.lock
Results:
PID # on nagios process
Let's create and rerun the upgrade:

Code: Select all

touch /run/nagios.lock
Then;

Code: Select all

bash -x upgrade
Thanks,
Perry
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by markmerchant »

Will try this on Monday, Thx.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Nagios XI upgrade 5.8.6 -> 5.8.7 failed during make

Post by pbroste »

Hello @markmerchant

Please let us know how it goes and if you need anything further,
Perry
Locked