How to upgrade XI with offloaded DB

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

How to upgrade XI with offloaded DB

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: How to upgrade XI with offloaded DB

Post by BanditBBS »

I'm anxiously watching this thread as my main XI install uses offloaded DB and I'd like to get it upgraded.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: How to upgrade XI with offloaded DB

Post 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.
Andrew J. - Do you even grok?
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: How to upgrade XI with offloaded DB

Post 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 :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: How to upgrade XI with offloaded DB

Post 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.
Andrew J. - Do you even grok?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to upgrade XI with offloaded DB

Post 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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: How to upgrade XI with offloaded DB

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: How to upgrade XI with offloaded DB

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: How to upgrade XI with offloaded DB

Post by BanditBBS »

I don't think so actually. Regardless, the update grabs the connection information from /usr/local/nagiosxi/html/config.inc.php
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: How to upgrade XI with offloaded DB

Post 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?
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
Locked