Page 1 of 2

How to upgrade XI with offloaded DB

Posted: Wed Jun 11, 2014 7:52 pm
by rajasegar
Nagios XI 2012R2.9
Offloaded DB
RHEL 6.5 x64
Manual Install
Firefox 29.0.1

Can you please advice how to go about upgrading an offloaded DB?
The current upgrade script does not work and it screwed up my installation.

PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /tmp/raja/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.<br /><br />Run the following from the CLI as root to attempt to repair the DB<br /><br /><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre>Checking required prereqs...
Please wait...

I had to restore everything from backup.

Nagios backup & restore scripts is also hardcoded to backup /restore DB's locally.
Please provide a script that works for offloaded DB's.

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 9:33 am
by BanditBBS
I'm anxiously watching this thread as my main XI install uses offloaded DB and I'd like to get it upgraded.

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 10:22 am
by vAJ
From my conversations with the support guys, there's not an issue with upgrading an offloaded DB instance.

I have yet to do mine, but the upgrade script pulls DB connect details from the config and updates it accordingly.

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 10:26 am
by BanditBBS
But doesnt the update also perform a mysql upgrade? It won't be able to do that remotely, so is there a list of items we need to upgrade on the offloaded db server?

I'd also like for the support guys to chime in here and agree with what vaj said(hopefully) and then answer the ? I just asked :)

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 10:42 am
by vAJ
I thought the same as well, but my mysql version is the same on my non-offloaded instance as it is on my offloaded instance. You may want to compare each mysql-related package between your instances as well to doublecheck.

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 11:31 am
by slansing
Yes the upgrade script does account for offloaded databases as far as I know, on the point of upgrading mysql, yes, we did upgrade the version of mysql being used by XI in the 2014 releases. That would have to be done manually on the remote database, though you may be able to get away with not doing this if you are exclusively using an offloaded database. I don't *think* we changed any hooks that would require anything pushed in that mysql update. I'll try to set aside some time to test upgrading from 2012 r2.9 with an offloaded database to 2014 r1.1.

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 11:54 am
by BanditBBS
I'm trying my server now..I'll report back if I have the same issues as OP or not. (I will have gearman and other issues, but I am prepared for them)

My upgrade went fine with offloaded DB.......just letting you know :D

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 6:18 pm
by rajasegar
BanditBBS wrote:I'm trying my server now..I'll report back if I have the same issues as OP or not. (I will have gearman and other issues, but I am prepared for them)

My upgrade went fine with offloaded DB.......just letting you know :D
Are you using the default passwords in the offloaded DB? Mine is not using defaults.

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 6:39 pm
by BanditBBS
I don't think so actually. Regardless, the update grabs the connection information from /usr/local/nagiosxi/html/config.inc.php

Re: How to upgrade XI with offloaded DB

Posted: Thu Jun 12, 2014 6:56 pm
by rajasegar
BanditBBS wrote:I don't think so actually. Regardless, the update grabs the connection information from /usr/local/nagiosxi/html/config.inc.php
Ok. Obviously there is some problem somewhere else I would not have got the connection error messages.
Does the upgrade script use mysql root? If yes where is it grabbing the info from?