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

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

Post by markmerchant »

Tried again on Monday after touching the lock file. Install might have gotten
one line farther than previous attempts. Unfortunately, lost the output. Will
try again.
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 what that log output looks like after you try it again.

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 »

The old install used to ask about modifying the sudoers file. I don't see that anymore.
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

Do you see results outlined in the upgrade.log or when running the 'bash -x upgrade' ?

Here is what you should see appended in your /etc/sudoers:

Code: Select all

User_Alias      NAGIOSXI=nagios
User_Alias      NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/send_to_nls.php *
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/migrate/migrate.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_ssl_config.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
Let me know what you see,
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 »

Error is a little different this this time. Couple of things...

1) There used to be a confirmation about modifying the sudoers file which
doesn't happen anymore. We always hit "No" because that sort of thing is not
allowed here.

2) The pid mentioned in the config file is different than the message message.
Should that be the same?

Code: Select all

ps -aux | grep -Ei 'nagios.cfg' && systemctl status nagios
    root      2954  0.0  0.0 112812  1016 pts/1    S+   11:05   0:00 grep --color=auto -Ei nagios.cfg
    ● nagios.service - LSB: Starts and stops the Nagios monitoring server
       Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
       Active: failed (Result: exit-code) since Tue 2022-02-01 11:03:21 EST; 2min 25s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 2167 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)

systemctl status nagios.service
    ● nagios.service - LSB: Starts and stops the Nagios monitoring server
    Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
    Active: failed (Result: exit-code) since Tue 2022-02-01 11:08:37 EST; 8min ago
    Docs: man:systemd-sysv-generator(8)
    Process: 7966 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)

    Feb 01 11:08:37 cvglqnagios01.td.afg nagios[7966]: Check your configuration file(s) to ensure that they contain valid
    Feb 01 11:08:37 cvglqnagios01.td.afg nagios[7966]: directives and data definitions. If you are upgrading from a previous
    Feb 01 11:08:37 cvglqnagios01.td.afg nagios[7966]: version of Nagios, you should be aware that some variables/definitions
    Feb 01 11:08:37 cvglqnagios01.td.afg nagios[7966]: may have been removed or modified in this version. Make sure to read
    Feb 01 11:08:37 cvglqnagios01.td.afg nagios[7966]: the HTML documentation regarding the config files, as well as the
    Feb 01 11:08:37 cvglqnagios01.td.afg nagios[7966]: 'Whats New' section to find out what has changed.
    Feb 01 11:08:37 cvglqnagios01.td.afg systemd[1]: nagios.service: control process exited, code=exited status=8
    Feb 01 11:08:37 cvglqnagios01.td.afg systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
    Feb 01 11:08:37 cvglqnagios01.td.afg systemd[1]: Unit nagios.service entered failed state.
    Feb 01 11:08:37 cvglqnagios01.td.afg systemd[1]: nagios.service failed.

bash -x upgrade
    Feb 01 11:03:21 cvglqnagios01.td.afg nagios[2167]: Check your configuration file(s) to ensure that they contain valid
    Feb 01 11:03:21 cvglqnagios01.td.afg nagios[2167]: directives and data definitions.  If you are upgrading from a previous
    Feb 01 11:03:21 cvglqnagios01.td.afg nagios[2167]: version of Nagios, you should be aware that some variables/definitions
    Feb 01 11:03:21 cvglqnagios01.td.afg nagios[2167]: may have been removed or modified in this version.  Make sure to read
    Feb 01 11:03:21 cvglqnagios01.td.afg nagios[2167]: the HTML documentation regarding the config files, as well as the
    Feb 01 11:03:21 cvglqnagios01.td.afg nagios[2167]: 'Whats New' section to find out what has changed.
    Feb 01 11:03:21 cvglqnagios01.td.afg systemd[1]: nagios.service: control process exited, code=exited status=8
    Feb 01 11:03:21 cvglqnagios01.td.afg systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
    Feb 01 11:03:21 cvglqnagios01.td.afg systemd[1]: Unit nagios.service entered failed state.
    Feb 01 11:03:21 cvglqnagios01.td.afg systemd[1]: nagios.service failed.


    *** 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:
    Usage:
     kill [options] <pid|name> [...]

    Options:
     -a, --all              do not restrict the name-to-pid conversion to processes
                            with the same uid as the present process
     -s, --signal <sig>     send specified signal
     -q, --queue <sig>      use sigqueue(2) rather than kill(2)
     -p, --pid              print pids without signaling them
     -l, --list [=<signal>] list signal names, or convert one to a name
     -L, --table            list signal names and numbers

     -h, --help     display this help and exit
     -V, --version  output version information and exit

    For more details see kill(1).
    done.
    Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
    + exit 0


upgrade.log
    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: done.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post by ssax »

What is the output of these commands?

Code: Select all

/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
sestatus
umask
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 »

<code>
ps -aux | grep -Ei 'nagios.cfg' && systemctl status nagios
root 2954 0.0 0.0 112812 1016 pts/1 S+ 11:05 0:00 grep --color=auto -Ei nagios.cfg

● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-02-01 11:03:21 EST; 2min 25s ago
Docs: man:systemd-sysv-generator(8)
Process: 2167 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)

upgrade
Feb 01 11:03:21 xxxxxnagios01.td.afg nagios[2167]: Check your configuration file(s) to ensure that they contain valid
Feb 01 11:03:21 xxxxxnagios01.td.afg nagios[2167]: directives and data definitions. If you are upgrading from a previous
Feb 01 11:03:21 xxxxxnagios01.td.afg nagios[2167]: version of Nagios, you should be aware that some variables/definitions
Feb 01 11:03:21 xxxxxnagios01.td.afg nagios[2167]: may have been removed or modified in this version. Make sure to read
Feb 01 11:03:21 xxxxxnagios01.td.afg nagios[2167]: the HTML documentation regarding the config files, as well as the
Feb 01 11:03:21 xxxxxnagios01.td.afg nagios[2167]: 'Whats New' section to find out what has changed.
Feb 01 11:03:21 xxxxxnagios01.td.afg systemd[1]: nagios.service: control process exited, code=exited status=8
Feb 01 11:03:21 xxxxxnagios01.td.afg systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Feb 01 11:03:21 xxxxxnagios01.td.afg systemd[1]: Unit nagios.service entered failed state.
Feb 01 11:03:21 xxxxxnagios01.td.afg systemd[1]: nagios.service failed.


*** 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:
Usage:
kill [options] <pid|name> [...]

Options:
-a, --all do not restrict the name-to-pid conversion to processes
with the same uid as the present process
-s, --signal <sig> send specified signal
-q, --queue <sig> use sigqueue(2) rather than kill(2)
-p, --pid print pids without signaling them
-l, --list [=<signal>] list signal names, or convert one to a name
-L, --table list signal names and numbers

-h, --help display this help and exit
-V, --version output version information and exit

For more details see kill(1).
done.
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
+ exit 0

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: done.
</code>
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 »

I am unable to reply...
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 if you are experiencing issue with forum post, are you able to provide the output of these commands?

Code: Select all

/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
sestatus
umask
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 »

<code>
/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/sn-heartbeat.cfg'...
Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'SN Heartbeat' on host 'localhost'
Error: Could not register service (config file '/usr/local/nagios/etc/services/sn-heartbeat.cfg', starting on line 16)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.


sestatus
SELinux status: disabled

umask
0002
</code>
Locked