Database crashed on production server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Database crashed on production server

Post by snapon_admin »

Hi, this topic was locked, but I just got an opportunity to try the upgrade of PHP to 5.6 and now i'm getting database errors and the DB repair script isn't fixing them. What do? I followed the instructions on page 3 of this thread, ran into no issues during the upgrade, but now everyhting is broken.

https://support.nagios.com/forum/viewto ... 1&start=20

This is all I'm getting when trying to connect to the web UI.

Code: Select all

Databse Error
A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB:

/usr/local/nagiosxi/scripts/repair_databases.sh
This is a critical issue that I need resolved asap. I cannot get a profile but we're running version 5.4.13, centOS 6.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Database crashed on production server

Post by ssax »

Did you run through this to update the sourceguardian loaders?

https://support.nagios.com/kb/article/n ... s-816.html

If you haven't yet, hold one while I get you some other commands.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Database crashed on production server

Post by ssax »

Run this again either way:

Code: Select all

cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd /tmp/nagiosxi
rm -rf /etc/php.d/sourceguardian.ini
./init.sh
sed -i '/^PHP script/d' xi-sys.cfg
sed -i '/^1)/d' xi-sys.cfg
sed -i '/^2)/d' xi-sys.cfg
sed -i '/^3)/d' xi-sys.cfg
./install-sourceguardian-extension.sh
service httpd restart
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Database crashed on production server

Post by snapon_admin »

That wasn't mentioned in the other thread so no, I don't believe that was done. I had to back the change out already by restoring to a snapshot. Server was down for an hour already so it couldn't wait, sorry.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Database crashed on production server

Post by ssax »

Ah okay, use those ones I provided when you attempt it again, I've requested the KB maintainer updated it with my additions.

Were you going to reschedule on my calendar for the upgrade?
Locked