Page 1 of 1

Nagios upgrade fails

Posted: Wed Dec 02, 2020 8:33 am
by brandondash
It has worked for us previously on other servers.
  • RHEL 7.5 STIG compliant
  • 64 bit
  • Manual "offline" upgrade from 5.6.8 to 5.7.2
  • Special configurations: We're running on NIPR so we don't have the RHEL repos; instead, we have milCloud1 repos. (This has not impacted us on other servers with a similar configuration)
Here is the tail of the xi-upgrade log:

Code: Select all

Done!
INSTALL: Dashlets installed/updated OK.
UPGRADE: POST-UPGRADE: NDO post upgrade started...

Removing depricated failure_prediction_enabled from NagiosQL
copying updated mysql-upgrade-2.0.0.sql
Current database version: 1.5.2
** DB upgrade required for 2.0.0
     Using mysql-upgrade-2.0.0.sql for upgrade...
ERROR 1060 (42S21) at line 8: Duplicate column name 'minimum_importance'
Upgrade from mysql-upgrade-2.0.0.sql failed at ./upgradedb line 108.
Removed symlink /etc/systemd/system/multi-user.target.wants/ndo2db.service.
Performing upgrade...
Your dbversion is 1.5.2, and our minimum supported upgrade version is 
Upgrade your version of NDOUtils to 2.0.1 before attempting this upgrade
This is quite strange since even before the error it doesn't map to other servers that have been upgraded. Here is a snippet for comparison:

Code: Select all

Done!
INSTALL: Dashlets installed/updated OK.
Copying over new XI directory...
Patching NDOUtils...
NDOUtils already patched at level 103
Updating sequences...
Postgres Database not being used
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
Note "Patching" instead of "UPGRADE"


So... what can I do to troubleshoot? I am not a database guy and I am uncertain how to use CLI mysql to make queries, much less what to ask.

Re: Nagios upgrade fails

Posted: Thu Dec 03, 2020 11:06 am
by ssax
Technically, since you were on XI 5.6.8 the DB version should have been v2.0.1, please run this command and then re-run the upgrade:
- Your output shows the column exists so it must have been upgraded proplery before but the version wasn't set

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagios -e "UPDATE nagios_dbversion SET version = '2.0.1' WHERE name='ndoutils';"
If it fails again, attach the full /tmp/xi-upgrade.log.

Re: Nagios upgrade fails

Posted: Fri Dec 04, 2020 8:28 am
by brandondash
Unfortunately that idea didn't work. The log is far too big to paste here. Do you have a preferred file sharing site?

Re: Nagios upgrade fails

Posted: Fri Dec 04, 2020 6:19 pm
by ssax
You can share if via any method that we can access. Dropbox or whatever you have should work, you can PM me the link so it's not public.

Please include a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.

Re: Nagios upgrade fails

Posted: Tue Dec 08, 2020 10:50 am
by brandondash
ssax wrote:You can share if via any method that we can access. Dropbox or whatever you have should work, you can PM me the link so it's not public.

Please include a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.
Sent. Check your messages.

Re: Nagios upgrade fails

Posted: Tue Dec 08, 2020 7:27 pm
by ssax
Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/

Thank you!

Re: Nagios upgrade fails

Posted: Thu Dec 10, 2020 11:22 am
by ssax
Locking thread, ticket received, we will continue support through the ticket.

Thank you!