Upgrade to 5.6.5 said it failed but it didn't, kind of

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jbpatric
Posts: 21
Joined: Tue Jan 02, 2018 11:17 am

Upgrade to 5.6.5 said it failed but it didn't, kind of

Post by jbpatric »

Related to another post of mine, "Upgrade to 5.6.4 said it failed but it didn't". Opening a new post because that one was locked.

Upgraded to 5.6.5 this morning and had the same problem when I upgraded to 5.6.4. Started the upgrade to 5.6.5 from the Admin-Check For Updates screen. When it finished it returned a message that the update failed and I should update Nagios manually. Even though it is telling me the server is running 5.6.5 the server is still reporting I need to upgrade to to 5.6.5. See the attached screen shot,
version.JPG
But, the site is reporting I am running 5.6.5.

Luckily I copied the upgrade text before refreshing the pages because the Update History at the bottom of the Check For Updates page doesn't have an entry for today's upgrade.
Here's the upgrade output...
---- Starting Nagios XI Backup ----
No entry for terminal type "unknown";
using dumb terminal settings.
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
tar: /usr/local/nagiosxi/var/sysstat.log: file changed as we read it
tar: /usr/local/nagiosxi/var/eventman.log: file changed as we read it
tar: /usr/local/nagiosxi/var: file changed as we read it
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up the SNMP directories
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up nagios user home dir...
tar: Removing leading `/' from member names
Backing up MySQL databases...
Backing up cronjobs for Apache...
Backing up logrotate config files...
Backing up Apache config files...
Compressing backup...

===============
BACKUP COMPLETE
===============
Backup stored in /store/backups/nagiosxi/autoupgrade_backup.1563542565.tar.gz

---- Starting Nagios XI Upgrade ----
Cleaning up temp directory...
No entry for terminal type "unknown";
using dumb terminal settings.
Nagios XI Upgrade Log
==========================
DATE: Fri Jul 19 09:26:18 EDT 2019

DISTRO INFO:
CentOS
7.6.1810
x86_64


No entry for terminal type "unknown";
using dumb terminal settings.
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
No entry for terminal type "unknown";
using dumb terminal settings.
Checking required prereqs...
Please wait...

OLD VERSION: 5604
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.fileplanet.com
* epel: mirror.steadfastnet.com
* extras: ftp.ussg.iu.edu
* updates: ftp.ussg.iu.edu
No packages marked for update
Loaded plugins: fastestmirror
Examining /usr/local/nagiosxi/tmp/nagiosxi/nagiosxi-deps-el7-5.6.5-1.noarch.rpm: nagiosxi-deps-el7-5.6.5-1.noarch
Marking /usr/local/nagiosxi/tmp/nagiosxi/nagiosxi-deps-el7-5.6.5-1.noarch.rpm as an update to nagiosxi-deps-el7-5.6.4-1.noarch
Resolving Dependencies
--> Running transaction check
---> Package nagiosxi-deps-el7.noarch 0:5.6.4-1 will be updated
---> Package nagiosxi-deps-el7.noarch 0:5.6.5-1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
nagiosxi-deps-el7 noarch 5.6.5-1 /nagiosxi-deps-el7-5.6.5-1.noarch 0.0

Transaction Summary
================================================================================
Upgrade 1 Package

Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : nagiosxi-deps-el7-5.6.5-1.noarch 1/2
Cleanup : nagiosxi-deps-el7-5.6.4-1.noarch 2/2
Verifying : nagiosxi-deps-el7-5.6.5-1.noarch 1/2
Verifying : nagiosxi-deps-el7-5.6.4-1.noarch 2/2

Updated:
nagiosxi-deps-el7.noarch 0:5.6.5-1

Complete!
UPGRADE: NRDP is being upgraded...
UPGRADE: NRDP upgraded OK.
no crontab for nagios
no crontab for root
Copying over new XI directory...
No entry for terminal type "unknown";
using dumb terminal settings.
Patching NDOUtils...
NDOUtils already patched at level 103
Installing new PNP templates...
Enabling large install tweaks...
Fixing config file permissions...
chown: cannot access ‘/var/www/html/nagiosql/config’: No such file or directory
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
No entry for terminal type "unknown";
using dumb terminal settings.

--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
No entry for terminal type "unknown";
using dumb terminal settings.

--- 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
--------------------------------------
No entry for terminal type "unknown";
using dumb terminal settings.

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

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-01-15
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 472)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 476.
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.
> Return Code: 1
--------------------------------------
No entry for terminal type "unknown";
using dumb terminal settings.
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/scripts
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1563507243.tar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1563507243.tar.gz
/usr/local/nagiosxi/scripts
No entry for terminal type "unknown";
using dumb terminal settings.

--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
Sames error I received that last upgrade...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 472)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 476.
So, last time this happened, as suggested, I deleted the config files, recreated and verified. But, to get the verify to work I had to remove the Template Name entry in the xi_timeperiod_24x7 time period. See the attached screen shot for what it looked like before I cleared the Template Name line,
timeperiod.JPG
. After removing that entry I successfully ran a verify files in config management. So, I know the template line was blank before attempting the upgrade today but it appears to have been added back during the upgrade. The upgrade process must add that line back in, but adding that back caused the upgrade to fail.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade to 5.6.5 said it failed but it didn't, kind of

Post by lmiltchev »

If the same issue happens on the next upgrade, check to see if the 'xi_timeperiod_24x7' is defined somewhere in the /usr/local/nagios/etc/static/ directory. You will hit a "duplicate definition" error if the template is defined in both places - in the static and in the database (CCM). Since nagios adds the template in the CCM, it would make sense to remove it from the static next time, so that you won't have to deal with this on every upgrade.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jbpatric
Posts: 21
Joined: Tue Jan 02, 2018 11:17 am

Re: Upgrade to 5.6.5 said it failed but it didn't, kind of

Post by jbpatric »

Went ahead a looked through these files in that directory, xiobjects.cfg xitemplates.cfg xitest.cfg, and there was an entry for 'xi_timeperiod_24x7'. I will look again when running the next upgrade.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Upgrade to 5.6.5 said it failed but it didn't, kind of

Post by mbellerue »

Is it alright if we mark this as closed?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
jbpatric
Posts: 21
Joined: Tue Jan 02, 2018 11:17 am

Re: Upgrade to 5.6.5 said it failed but it didn't, kind of

Post by jbpatric »

Please keep this open until the next update comes out.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Upgrade to 5.6.5 said it failed but it didn't, kind of

Post by benjaminsmith »

Please keep this open until the next update comes out.
Sounds good. We'll keep it open.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked