Upgrade from 5.2.7 to 5.5.0 failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

Hi, I hope you'll be able to help. I attempted to upgrade one of our Nagios XI instance which is currently running 5.2.7 to 5.5.0 but it failed. I tried both the automated (within the Nagios XI interface) and manual process using this guide:
https://assets.nagios.com/downloads/nag ... ctions.pdf

First time when I ran the manual update it failed with these errors:
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:2: ERROR: column "api_key" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:3: ERROR: column "api_enabled" of relation "xi_users" already exists
UPDATE 9
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:8: ERROR: column "login_attempts" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:9: ERROR: column "last_attempt" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:10: ERROR: column "last_password_change" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:13: ERROR: column "last_login" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:14: ERROR: column "last_edited" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:15: ERROR: column "last_edited_by" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:16: ERROR: column "created_by" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:17: ERROR: column "created_time" of relation "xi_users" already exists
ERROR 1060 (42S21) at line 27: Duplicate column name 'exclude'

I did a bit of search on internet and found a suggestion on Nagios support forum to comment out a small section of upgrade.sh and it started working but never completed and I didn't get any errors.

However, Nagios XI is still the same version and "Monitoring Engine" won't start.

I've attached the upgrade.log so you can help me figure out why its failed.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

After the Extra Plugins you should be getting a prompt:

Code: Select all

		===================
		XI 5.3.0 Updates
		===================
		NOTICE: This upgrade script will update ALL XI components, wizards, and dashlets
		to the latest available versions. Before running this upgrade the currently 
		installed versions will be backed up to the /tmp directory. 

Are you sure you want to continue? [y/N] 
Are you not getting this on the screen?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

Scott thanks for your prompt response.

I just ran the upgrade to see what I get and these are the last few lines I see in the terminal when I run upgrade script.

t/check_stuff.t .............................. ok
t/Nagios-Monitoring-Plugin-01.t .............. ok
t/Nagios-Monitoring-Plugin-02.t .............. ok
t/Nagios-Monitoring-Plugin-03.t .............. ok
t/Nagios-Monitoring-Plugin-04.t .............. ok
t/Nagios-Monitoring-Plugin-Functions-01.t .... ok
t/Nagios-Monitoring-Plugin-Functions-02.t .... ok
t/Nagios-Monitoring-Plugin-Functions-03.t .... ok
t/Nagios-Monitoring-Plugin-Getopt-01.t ....... ok
t/Nagios-Monitoring-Plugin-Getopt-02.t ....... ok
t/Nagios-Monitoring-Plugin-Getopt-03.t ....... ok
t/Nagios-Monitoring-Plugin-Getopt-04.t ....... ok
t/Nagios-Monitoring-Plugin-Performance-02.t .. ok
t/Nagios-Monitoring-Plugin-Performance.t ..... ok
t/Nagios-Monitoring-Plugin-Range.t ........... ok
t/Nagios-Monitoring-Plugin-Threshold.t ....... ok
All tests successful.
Files=16, Tests=975, 4 wallclock secs ( 0.18 usr 0.05 sys + 3.53 cusr 0.20 csys = 3.96 CPU)
Result: PASS
Appending installation info to /usr/lib64/perl5/perllocal.pod
Extra Plugins upgraded OK
./upgrade: line 1414: syntax error: unexpected end of file

The upgrade just exits at this stage.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

5.5.1 was just release and will get past a few upgrade hurdles, can you re-download the new tarball and try with that.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

Thanks for updating me with 5.5.1 release.

I rang the upgrade script after downloading 5.5.1, I saw this:
===================
XI 5.3.0 Updates
===================
NOTICE: This upgrade script will update ALL XI components, wizards, and dashlets
to the latest available versions. Before running this upgrade the currently
installed versions will be backed up to the /tmp directory.

Are you sure you want to continue? [y/N]

Went ahead with y and after little while I got the same error:

Done!
INSTALL: Dashlets installed/updated OK.
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:2: ERROR: column "api_key" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:3: ERROR: column "api_enabled" of relation "xi_users" already exists
UPDATE 9
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:8: ERROR: column "login_attempts" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:9: ERROR: column "last_attempt" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:10: ERROR: column "last_password_change" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:13: ERROR: column "last_login" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:14: ERROR: column "last_edited" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:15: ERROR: column "last_edited_by" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:16: ERROR: column "created_by" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:17: ERROR: column "created_time" of relation "xi_users" already exists
ERROR 1060 (42S21) at line 27: Duplicate column name 'exclude'
[root@nagios nagiosxi]#
You do not have the required permissions to view the files attached to this post.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by jomann »

Before you re-run the upgrade can you run:

Code: Select all

touch mysql.530.updated
This should stop that part of the MySQL upgrade from running, since it has already been applied.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

I touched the file as you suggested in /tmp/nagiosxi directory where I've untarred the NagiosXI 5.5.1 download file.
The upgrade process definitely went further this time but it didn't complete as I was expecting. I've attached the new upgrade.log file.
Your help would be really appreciated.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

I'm not really sure why it stopped here without error.

Please update the upgrade script and on line 22 change

Code: Select all

CORE_UPDATED=0
to

Code: Select all

CORE_UPDATED=1
then run upgrade again
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

I made the change as you suggested:

[root@nagios nagiosxi]# grep 'CORE_UPDATED=' upgrade
CORE_UPDATED=1

However, it ended in the same way. I've uploaded the log file.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

Not in the same spot, very odd your system is exiting without cause after these compiling, we have never seen this, one more change

Please update the upgrade script and on line 23 change

Code: Select all

NDO_UPDATED=0
to

Code: Select all

NDO_UPDATED=1
then run upgrade again
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked