issue with database

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
abhi
Posts: 7
Joined: Wed Aug 17, 2016 12:29 pm

issue with database

Post by abhi »

Hi There!
Im pretty new to nagios and I am running into this issue everytime I try to login to the webpage.
Request you to kindly advise me on how to troubleshoot the same.
Thank you,
A
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: issue with database

Post by mcapra »

Have you tried running the script mentioned on that page from the CLI?

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Former Nagios employee
https://www.mcapra.com/
abhi
Posts: 7
Joined: Wed Aug 17, 2016 12:29 pm

Re: issue with database

Post by abhi »

Hi there,
Yes I did run the script .. but it didnt work and I am encountering the same issue. Please let me know what is the best way to resolve it.
Thank you
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: issue with database

Post by mcapra »

Can you share the output of that script? Also share the output of the following:

Code: Select all

ls -al /usr/local/nagiosxi/scripts/
Former Nagios employee
https://www.mcapra.com/
abhi
Posts: 7
Joined: Wed Aug 17, 2016 12:29 pm

Re: issue with database

Post by abhi »

Hi there
here is the screenshot for : ls -al /usr/local/nagiosxi/scripts/
Please let me know how to proceed.
Than you
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: issue with database

Post by mcapra »

Please remove the repair_databases.lock file and run the script again:

Code: Select all

rm /usr/local/nagiosxi/scripts/repair_databases.lock
/usr/local/nagiosxi/scripts/repair_databases.sh
Former Nagios employee
https://www.mcapra.com/
abhi
Posts: 7
Joined: Wed Aug 17, 2016 12:29 pm

Re: issue with database

Post by abhi »

Hi There,
So I ran the commands you asked me to run but ran into the following issue.
Please let me know how I can proceed next.
Thank you
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: issue with database

Post by mcapra »

Strange that there are no myi files in that directory. Share the output of:

Code: Select all

ls -al /var/lib/mysql/nagios
ls -al /var/lib/mysql/nagiosql
ls -al /var/lib/mysql/nagiosxi
Former Nagios employee
https://www.mcapra.com/
abhi
Posts: 7
Joined: Wed Aug 17, 2016 12:29 pm

Re: issue with database

Post by abhi »

Hi there,
I ran the commands as instructed by you, here is the output of it..please let me know the next best step,
Thank you

[root@nagios ~]# ls -al /var/lib/mysql/nagios
total 8
drwxr-xr-x 2 root root 4096 Mar 17 15:29 .
drwxr-xr-x. 4 mysql mysql 4096 Aug 31 14:36 ..

[root@nagios ~]# ls -al /var/lib/mysql/nagiosql
total 8
drwxr-xr-x 2 root root 4096 Mar 17 15:32 .
drwxr-xr-x. 4 mysql mysql 4096 Aug 31 14:39 ..

[root@nagios ~]# ls -al /var/lib/mysql/nagiosxi
ls: cannot access /var/lib/mysql/nagiosxi: No such file or directory
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: issue with database

Post by mcapra »

It looks like you're missing some important files for your MySQL databases.

Please follow this KB article for instructions on how to restore them from a backup:
https://support.nagios.com/kb/article.php?id=492

If you don't know of any backups in existence, you might refer to the "Emergency Restore" section.
Former Nagios employee
https://www.mcapra.com/
Locked