Page 1 of 1
Upgrade from 5.4.2 to 5.6.3 fails
Posted: Fri Jun 21, 2019 8:08 am
by johnbrodhurstadm
Attempting to take over an old Nagios XI installation that has been un-maintained for some time. I've been asked to update to the latest version, and after fixing an issue of dirty databases with a repair script, I'm now stuck receiving the following error when I try to update in the web interface:
Code: Select all
ERROR 1060 (42S21) at line 25: Duplicate column name 'dependent_servicegroup_name'
I've checked using
touch mysql.5600.updated which has allowed the upgrade to get this far - it failed much earlier before I did that - it gets that far and stops. I've used the upgrade script on the shell which completes, but the web UI still says that it's on 5.4.2 and needs to be updated. I'm not sure what to do next, as I'm quite new to Nagios full stop.
Re: Upgrade from 5.4.2 to 5.6.3 fails
Posted: Fri Jun 21, 2019 11:16 am
by benjaminsmith
Hi John,
Let's try upgrading this server using the manual process. Log in as root in the terminal and run the following commands:
Code: Select all
cd /tmp
rm -rf nagiosxi xi*.tar.gz
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi
./upgrade
If the upgrade fails again, please post the upgrade log at
/usr/local/nagiosxi/tmp/upgrade.log, and PM your system profile.
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket.
Let me know if you have any questions or need clarification on anything.
Re: Upgrade from 5.4.2 to 5.6.3 fails
Posted: Mon Jun 24, 2019 10:14 am
by johnbrodhurstadm
Hi Benjamin Smith
Thank you for your instructions. Unfortunately it's the result same again,
ERROR 1060 (42S21) at line 25: Duplicate column name 'dependent_servicegroup_name'.
The Nagios XI server VM is to a certain extent isolated with no SSH available (plus ajaxterm won't authenticate the nagiosadmin account), and I'm only able to access the terminal via the VM console. In order to get the logfile, I've re-run the upgrade from the web UI as it has exactly the same result, and it's attached. I'll PM you the profile.zip presently.
Looking through the (extensive) log, I can see these lines (15552-15559) which seem likely to be problematic:
Code: Select all
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:11: ERROR: relation "xi_cmp_trapdata_trapdata_id_seq" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:17: ERROR: relation "xi_cmp_trapdata_trapdata_log_id_seq" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:34: ERROR: relation "xi_cmp_trapdata" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:54: ERROR: relation "xi_cmp_trapdata_log" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:61: ERROR: relation "xi_auth_tokens_id_seq" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:75: ERROR: relation "xi_auth_tokens" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:82: ERROR: relation "xi_sessions_id_seq" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_03.sql:96: ERROR: relation "xi_sessions" already exists
TIA, KR
Re: Upgrade from 5.4.2 to 5.6.3 fails
Posted: Mon Jun 24, 2019 11:39 am
by johnbrodhurstadm
Actually, I may have cracked it.
Followed instructions from
https://support.nagios.com/forum/viewto ... =6&t=54047, namely
- deleted and downloaded as you instructed
Code: Select all
cd /tmp/nagiosxi/
touch mysql.5600.updated
- Got different error, this time about snmptt user account, so then did:
- useradd snmptt
- finally ran upgrade script again
Now it reports that it's on 5.6.3 although there is a PHP warning on the console:
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491 However it seems to be working...
Re: Upgrade from 5.4.2 to 5.6.3 fails
Posted: Mon Jun 24, 2019 12:49 pm
by benjaminsmith
Hi John,
Good to hear and thanks for posting the solution.
You can safely ignore the PHP message. That product has been deprecated and if you're not using Nagios Incident Manager, you can remove the whole directory.
Code: Select all
rm -rf /usr/local/nagiosxi/html/includes/components/nagiosim
Re: Upgrade from 5.4.2 to 5.6.3 fails
Posted: Mon Jul 01, 2019 5:49 am
by johnbrodhurstadm
Apologies for the delay to reply, but thank you very much for your assistance. I now have a very happy customer

Re: Upgrade from 5.4.2 to 5.6.3 fails
Posted: Mon Jul 01, 2019 7:21 am
by scottwilkerson
johnbrodhurstadm wrote:Apologies for the delay to reply, but thank you very much for your assistance. I now have a very happy customer

Glad to hear it is working!
Locking thread