Page 1 of 1

Problems with upgrade to 5.5.1

Posted: Fri Jul 13, 2018 7:09 am
by hbouma
When running the update from the GUI, I get to the point of resetting the permissions, and get the error "sorry, you must have a tty to run sudo." The log then says that we must run the upgrade manually.

Oddly, we have already fixed this in our sudoers file

Code: Select all

Defaults:nagios !requiretty
The odd thing is that the upgrade log is blank

Code: Select all

-rwxrwxr--.  1 nagios nagios    0 Jul 13 08:02 upgrade.log
Also, the GUI reports that the upgrade completed.
2018-07-13 08_07_41-Administration ยท Nagios XI.png
Running Nagios XI 5.5.? on Red Hat 7 64bit. Installed via the online installer.

Re: Problems with upgrade to 5.5.1

Posted: Fri Jul 13, 2018 10:04 am
by jomann
Once you ran it manually did it work? The upgrade looks like it completed if it's showing properly in the UI.

When it runs it from the web UI it runs it through a script that it runs sudo with. The permissions part of the script runs:

Code: Select all

sudo /usr/local/nagiosxi/scripts/reset_config_perms.sh
Was it exiting there? I would suggest switching into the nagios user and confirming that sudo is allowing you to run that even with the default set.

As for the upgrade log, which upgrade log is that? The one from the UI or from when you manually ran the upgrade?

Re: Problems with upgrade to 5.5.1

Posted: Fri Jul 13, 2018 11:17 am
by hbouma
The one for the UI accidently got closed before being copied. This was the one from /usr/local/nagiosxi/tmp/

Running the script locally as the Nagios user works fine. Running the upgrade manually works fine.
nagios@xxxxxxxxxxxxx [/etc/cron.d]
$ sudo /usr/local/nagiosxi/scripts/reset_config_perms.sh

--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------


Here is the output from the manual run after we were told that the GUI update failed and to run manually (The GUI did say that we were on 5.5.1 at this point, but also said the update failed).
08:09 AM xxxxxxxxxxxxx root [/usr/local/nagiosxi/tmp/nagiosxi]
$ ./upgrade
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
Checking required prereqs...
Please wait...

OLD VERSION: 5501
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No packages marked for update
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package perl-Test-Simple-0.98-243.el7.noarch already installed and latest version
Package perl-Class-Accessor-0.34-12.el7.noarch already installed and latest version
Package perl-Params-Validate-1.08-4.el7.x86_64 already installed and latest version
Package perl-Config-Tiny-2.14-7.el7.noarch already installed and latest version
Package perl-Math-Calc-Units-1.07-9.el7.noarch already installed and latest version
Package perl-Number-Format-1.73-14.el7.noarch already installed and latest version
Nothing to do
no crontab for nagios
Saving old crontab to /tmp/root.crontab.orig.1...
Removing XI cron jobs...
Copying over new XI directory...
Patching NDOUtils...
NDOUtils already patched at level 103
Installing new PNP templates...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...

--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/xi_timeperiod_24x7.cfg .. SUCCESS
--------------------------------------

--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 41 hosts.
Checked 172 host groups.
Checked 0 service groups.
Checked 10 contacts.
Checked 70 contact groups.
Checked 131 commands.
Checked 16 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 41 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 16 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
> Return Code: 0
--------------------------------------

Nagios XI Upgrade Complete!
---------------------------

You can access the Nagios XI web interface by visiting:
http://XXXXXXXXXXXXXX/nagiosxi

Re: Problems with upgrade to 5.5.1

Posted: Fri Jul 13, 2018 11:38 am
by lmiltchev
The GUI did say that we were on 5.5.1 at this point, but also said the update failed
What was the Nagios XI version that you were upgrading from? I've seen some weirdness with upgrades from the web UI, when upgrading from very old versions of Nagios XI.

In addition to this, it seems like you had some sudoers/permissions issues, but these must have been resolved as your upgrade completed successfully. Your upgrade.log in /tmp/nagiosxi (or /usr/local/nagiosxi/var) directory is not empty now, is it?

Let us know if you have any more issues or it is safe to close this topic. Thank you!

Re: Problems with upgrade to 5.5.1

Posted: Fri Jul 13, 2018 11:57 am
by hbouma
Upgrade was from 5.5.0 to 5.5.1.

The /usr/local/nagiosxi/tmp/upgrade.log file is still empty. This is the file that was created by the GUI upgrade process based on https://assets.nagios.com/downloads/nag ... ptions.pdf


This was opened due to the fact that we saw an issue and wanted to report it. The upgrade was able to be preformed with a manual install from the command line.

Re: Problems with upgrade to 5.5.1

Posted: Fri Jul 13, 2018 12:31 pm
by jomann
The error and exiting out of the GUI upgrade was likely the cause of the empty upgrade file. We will test it again internally, so thanks for letting us know.