issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
bluskeyes
Posts: 3
Joined: Tue Oct 05, 2021 7:46 am

issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by bluskeyes »

On Red Hat 8 there is an issue updating via repository from 2024R1.2.1 (or earlier) to 1.2.2 or 1.3
I can install the version with 'dnf update', and the install finishes without reporting any issue.
But in the web interface the version still indicates the installed version is 2024R1.2.1 and that there is an update available to 2024R1.3
The same happens when you update e.g. from 2024R1.1.5 to 1.2.2 or 1.3 (web interface shows 1.1.5 as installed version).
Updating from 2024R1.1.5 to 2024R1.2.1 does not have this problem.
This problem occurs when updating via repositories (i did not try other means of updating, and i don't want to, since our preferred method of updating is through repositories).
I did not have the issue on Red Hat 9

Wkr,
jsimon
Posts: 339
Joined: Wed Aug 23, 2023 11:27 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by jsimon »

Hi @bluskeyes,

Can you advise what method was used to install the initial version of XI? It sounds like you're using RPM upgrades, but if the initial install was done via CLI from a tarball, there are some known issues with upgrading that type of installation using RPM.
bluskeyes
Posts: 3
Joined: Tue Oct 05, 2021 7:46 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by bluskeyes »

Hi,

I did the initial install also via RPM, always through following repositories:
# cat /etc/yum.repos.d/nagios-8.repo
[nagios-base]
name=Nagios
baseurl=https://repo.nagios.com/nagios/8/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NAGIOS-V3
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NAGIOS-V2

[nagiosxi-deps]
name=Nagios XI Dependencies
baseurl=https://repo.nagios.com/nagiosxi-deps/8/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NAGIOS-V3
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NAGIOS-V2

The initial version i installed in this manner is 5.8.10, and then subsequent upgrades all worked fine up till version 2024R1.2.1 (included).
As said before, from this point upgrades to 2024R1.2.2 or higher seems to work fine as well: No errors when doing 'dnf update', but in the web browser the version still indicates 2024R1.2.1

wkr,
jsimon
Posts: 339
Joined: Wed Aug 23, 2023 11:27 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by jsimon »

Can you try running these commands, and providing the output?

Code: Select all

cat /usr/local/nagiosxi/var/xiversion | grep full

Code: Select all

## Core version:
/usr/local/nagios/bin/nagios -v | grep "Nagios Core 4"                                             
## NDO Version:
/usr/bin/strings /usr/local/nagios/bin/ndo.so | grep Copyright
The database is one of the last things that gets updated, so this will let us know if the upgrade was successful up to that point. We're looking to see if the code upgrades and Nagios Core were updated to the correct version.
bluskeyes
Posts: 3
Joined: Tue Oct 05, 2021 7:46 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by bluskeyes »

Hi,

I fixed the issue. Here's how to do it.
As pointed out by 'jsimon', the initial install was indeed via source / tarball.
But in the mean time we already moved quite a long time ago to a new server when moving from version 5.8.9 to 5.11.2.
And this new server used the RPM method to update NagiosXI.
Subsequent updates all worked fine up until 2024R1.2.1.
To fix the issue when upgrading to even higher versions, i adapted the file: /usr/local/nagiosxi/var/xi-itype
It's content was (still) 'source', which i changed to 'rpm'.
After this the upgrade to version 2024R1.3 worked perfectly via 'dnf update'.
So issue solved. It had nothing to do with the version of RedHat as i initially thought.
There's just still the question why this was no issue up till version 2024R1.2.1, but only from version 2024R1.2.2 onwards.

Wkr,
sgardil
Posts: 355
Joined: Wed Aug 09, 2023 9:58 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by sgardil »

bluskeyes wrote: Fri Oct 25, 2024 2:26 am Hi,

I fixed the issue. Here's how to do it.
As pointed out by 'jsimon', the initial install was indeed via source / tarball.
But in the mean time we already moved quite a long time ago to a new server when moving from version 5.8.9 to 5.11.2.
And this new server used the RPM method to update NagiosXI.
Subsequent updates all worked fine up until 2024R1.2.1.
To fix the issue when upgrading to even higher versions, i adapted the file: /usr/local/nagiosxi/var/xi-itype
It's content was (still) 'source', which i changed to 'rpm'.
After this the upgrade to version 2024R1.3 worked perfectly via 'dnf update'.
So issue solved. It had nothing to do with the version of RedHat as i initially thought.
There's just still the question why this was no issue up till version 2024R1.2.1, but only from version 2024R1.2.2 onwards.

Wkr,
Hey Wkr

Glad to hear you fixed the issue. There has been some changes made with the current itteration of XI that is being worked on to not purely rely on the xi-itype file contents. Hopefully this doesnt cause conflict with your specific situation but if it does please let us know on here. That being said its always best to keep to the same installation type when doing upgrades as it causes issues trying to do go between source and rpm types.
ZaanstadXI
Posts: 3
Joined: Tue Oct 25, 2016 2:59 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by ZaanstadXI »

bluskeyes wrote: Fri Oct 25, 2024 2:26 am Hi,

I fixed the issue. Here's how to do it.
As pointed out by 'jsimon', the initial install was indeed via source / tarball.
But in the mean time we already moved quite a long time ago to a new server when moving from version 5.8.9 to 5.11.2.
And this new server used the RPM method to update NagiosXI.
Subsequent updates all worked fine up until 2024R1.2.1.
To fix the issue when upgrading to even higher versions, i adapted the file: /usr/local/nagiosxi/var/xi-itype
It's content was (still) 'source', which i changed to 'rpm'.
After this the upgrade to version 2024R1.3 worked perfectly via 'dnf update'.
So issue solved. It had nothing to do with the version of RedHat as i initially thought.
There's just still the question why this was no issue up till version 2024R1.2.1, but only from version 2024R1.2.2 onwards.

Wkr,
After adjusting /usr/local/nagiosxi/var/xi-itype did you also update the file /usr/local/nagiosxi/var/xiversion?

After rpm update to 2024R1.3 our xiversion file still looks like this:

###################################
# DO NOT DELETE THIS FILE!
# Nagios XI version information
###################################
full=2024R1.2.1
major=2024R1
minor=2.1
releasedate=2024-08-27
release=60201
sgardil
Posts: 355
Joined: Wed Aug 09, 2023 9:58 am

Re: issues upgrading via repository from 2024R1.2.1 to 1.2.2 or 1.3

Post by sgardil »

ZaanstadXI wrote: Thu Oct 31, 2024 7:24 am
After adjusting /usr/local/nagiosxi/var/xi-itype did you also update the file /usr/local/nagiosxi/var/xiversion?

After rpm update to 2024R1.3 our xiversion file still looks like this:

###################################
# DO NOT DELETE THIS FILE!
# Nagios XI version information
###################################
full=2024R1.2.1
major=2024R1
minor=2.1
releasedate=2024-08-27
release=60201
Hey @ZaanstadXI

Am I safe to assume that you were originally on a source install and are now trying to upgrade via rpms? If you want to move to the rpm process you are best to do a backup and spin up a new system with a rpm install and migrating to that server. I know this isnt the most convenient thing but this is the safest way to avoid a lot of headaches down the line. Here is a link to our documentation for backing up and migrating your XI. Let us know if you have any questions.
Post Reply