Upgrade from 5.2.7 to 5.5.0 failed

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Upgrade from 5.2.7 to 5.5.0 failed

Postby blueagle » Thu Jul 12, 2018 7:29 am

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.
Attachments
upgrade.log
(208.49 KiB) Downloaded 7 times
blueagle
 
Posts: 10
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Postby scottwilkerson » Thu Jul 12, 2018 7:50 am

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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 10396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Upgrade from 5.2.7 to 5.5.0 failed

Postby blueagle » Thu Jul 12, 2018 8:01 am

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.
blueagle
 
Posts: 10
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Postby scottwilkerson » Thu Jul 12, 2018 1:58 pm

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 10396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Upgrade from 5.2.7 to 5.5.0 failed

Postby blueagle » Fri Jul 13, 2018 3:59 am

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]#
Attachments
upgrade.log
(188.42 KiB) Downloaded 7 times
blueagle
 
Posts: 10
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Postby jomann » Fri Jul 13, 2018 12:37 pm

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.
User avatar
jomann
Development Lead / Senior Developer
 
Posts: 471
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises


Return to Nagios XI

Who is online

Users browsing this forum: davidjumani and 15 guests