We try to migrate Nagiosxi appliance from 5.7.4. on Centos 6 to 5.7.4. on Centos 7 appliance.
Restore finishes without errors. But when we try to access nagios web interface we see the following error:
Run the following from the CLI as root to attempt to repair the DB:
/usr/nagiosxi/scripts/repair_databses.sh
Running the script does not fix anything.
Because we moved from Centos 6 to 7 we also try to run the restore_repair.sh
But this gives the following error:
UPGRADE: POST-UPGRADE: NDO post upgrade started...
Performing install...
> Creating database with user
> Enter MySQL root password: nagiosxi
> Using command line supplied credentials for account/db creation...
> Username: ndoutils
> Password: *****
> Database: nagios
> Press <ENTER> to continue...
ERROR 1007 (HY000) at line 1: Can't create database 'nagios'; database exists
Something went wrong creating database 'nagios'
Finished restore repair OK
Please help us out
Nagios xi appliance migration
-
- Posts: 247
- Joined: Tue Aug 31, 2021 3:25 pm
Re: Nagios xi appliance migration
Hi Backendsupport,
Some quick questions:
1) Is the database installed on the same server as Nagiosxi or do you have it offloaded to a different host ?
2) Where is nagiosxi installed on your system is it in "/usr" or "/usr/local" ?
3) How did you install 5.7.4 ? Did you install it via RPM or pull down the bundle and install it manually as described on page three of the Manual Install Guide:
https://assets.nagios.com/downloads/nag ... -Linux.pdf
If it is the later try restoring the data and then running then upgrade script in the nagiosxi directory created by the xi-5.7.4.tar.gz tar file (usually installed in /tmp).
Just in case it's no longer on the system here is a link to the previous version archive:
https://assets.nagios.com/downloads/nag ... rsions.php
Then restart the system:
If that fails please PM me the upgrade.log file along with a system profile. You can generate a system profile on the command line using the following (remove local from the paths below if nagiosxi is installed in /usr rather than /usr/local ):
Thanks and Best Regards,
Keith
Some quick questions:
1) Is the database installed on the same server as Nagiosxi or do you have it offloaded to a different host ?
2) Where is nagiosxi installed on your system is it in "/usr" or "/usr/local" ?
3) How did you install 5.7.4 ? Did you install it via RPM or pull down the bundle and install it manually as described on page three of the Manual Install Guide:
https://assets.nagios.com/downloads/nag ... -Linux.pdf
If it is the later try restoring the data and then running then upgrade script in the nagiosxi directory created by the xi-5.7.4.tar.gz tar file (usually installed in /tmp).
Code: Select all
./upgrade
Just in case it's no longer on the system here is a link to the previous version archive:
https://assets.nagios.com/downloads/nag ... rsions.php
Then restart the system:
Code: Select all
/sbin/init 6
Code: Select all
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Code: Select all
/usr/local/nagiosxi/var/components/profile.zip
Keith
-
- Posts: 8
- Joined: Tue Aug 29, 2017 1:34 am
Re: Nagios xi appliance migration
1) Is the database installed on the same server as Nagiosxi or do you have it offloaded to a different host ?
Same server
2) Where is nagiosxi installed on your system is it in "/usr" or "/usr/local" ?
It's in usr/local/nagios, this is the nagiosxi appliance
3) How did you install 5.7.4 ? Did you install it via RPM or pull down the bundle and install it?
I did not install it. I downloaded 5.7.4. appliance, downloaded the tar from the restore_repair.sh
4) upgrade fails:
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib64/php/modules/ixed.5.4.lin
Sourceguardian extension found for PHP version 5.4
Sourceguardian extension already in php.ini
PHP Fatal error: Uncaught exception 'Exception' with message 'A database connection error has been detected, please follow t he repair prompt below. If the issue persists, please contact Nagios support.' in /root/nagiosxi/nagiosxi/basedir/html/includ es/db.inc.php:328
Stack trace:
#0 /root/nagiosxi/verify-prereqs.php(0): db_connect('nagiosxi')
#1 /root/nagiosxi/verify-prereqs.php(2): sg_load('52C4625F2E33770...')
#2 {main}
thrown in /root/nagiosxi/nagiosxi/basedir/html/includes/db.inc.php on line 328
5) I cannot upload logging since this is a sensitive system. please PM me for follow up. This procedure has taken a lot off time now.
Same server
2) Where is nagiosxi installed on your system is it in "/usr" or "/usr/local" ?
It's in usr/local/nagios, this is the nagiosxi appliance
3) How did you install 5.7.4 ? Did you install it via RPM or pull down the bundle and install it?
I did not install it. I downloaded 5.7.4. appliance, downloaded the tar from the restore_repair.sh
4) upgrade fails:
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib64/php/modules/ixed.5.4.lin
Sourceguardian extension found for PHP version 5.4
Sourceguardian extension already in php.ini
PHP Fatal error: Uncaught exception 'Exception' with message 'A database connection error has been detected, please follow t he repair prompt below. If the issue persists, please contact Nagios support.' in /root/nagiosxi/nagiosxi/basedir/html/includ es/db.inc.php:328
Stack trace:
#0 /root/nagiosxi/verify-prereqs.php(0): db_connect('nagiosxi')
#1 /root/nagiosxi/verify-prereqs.php(2): sg_load('52C4625F2E33770...')
#2 {main}
thrown in /root/nagiosxi/nagiosxi/basedir/html/includes/db.inc.php on line 328
5) I cannot upload logging since this is a sensitive system. please PM me for follow up. This procedure has taken a lot off time now.
-
- Posts: 247
- Joined: Tue Aug 31, 2021 3:25 pm
Re: Nagios xi appliance migration
Hi Backendsupport
If this is a sensitive system please file a support ticket and reference this thread so we can confidentially assist you further.
https://support.nagios.com/tickets/
Thanks and Best Regards,
Keith
If this is a sensitive system please file a support ticket and reference this thread so we can confidentially assist you further.
https://support.nagios.com/tickets/
Thanks and Best Regards,
Keith