Page 1 of 1

Database crashed on production server

Posted: Thu Apr 11, 2019 12:02 pm
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.

Re: Database crashed on production server

Posted: Thu Apr 11, 2019 12:56 pm
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.

Re: Database crashed on production server

Posted: Thu Apr 11, 2019 12:59 pm
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

Re: Database crashed on production server

Posted: Thu Apr 11, 2019 1:05 pm
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.

Re: Database crashed on production server

Posted: Thu Apr 11, 2019 3:28 pm
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?