Page 1 of 1
SQL Error
Posted: Mon Apr 15, 2019 12:53 pm
by mkeey
When I go to the Home page and try any display I receive this on the screen...
SQL Error [ndoutils] : Incorrect file format 'nagios_servicestatus'
Went to Admin / System Status and I get a blank screen.
Tried to delete the ndo.sock and reboot server. No change.
Tried to delete all config files, write config files and restart core. No change.
There was a post regarding this but the customer was requested to open a service ticket and I couldn't see the resolution.
Nagios XI is inoperable at this time.
Re: SQL Error
Posted: Mon Apr 15, 2019 1:09 pm
by benjaminsmith
Hi
@mkeey,
Please run the database repair script, log into the server as root and run the following:
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.sh
If that doesn't resolve the error, run the following command:
Code: Select all
service mysqld start
echo 'repair table nagios_servicestatus use_frm;' | mysql -t -u root -pnagiosxi nagios
service mysqld restart
Let us know if you get it resolved.
Reference:
Repairing The Nagios XI Databases
Re: SQL Error
Posted: Mon Apr 15, 2019 1:26 pm
by mkeey
First command appears to have failed...
[root@NAGIOXISERVER]:[/root]# systemctl start mysqld
Failed to start mysqld.service: Unit not found.
Currently performing the second part of your instructions.
Re: SQL Error
Posted: Mon Apr 15, 2019 1:40 pm
by ssax
Replace mysqld with mariadb in your commands:
Code: Select all
systemctl start mariadb
echo 'repair table nagios_servicestatus use_frm;' | mysql -t -u root -pnagiosxi nagios
systemctl restart mariadb
If it still fails to start, please send the output of this command:
Code: Select all
tail /var/log/messages /var/log/mariadb/mariadb.log
Re: SQL Error
Posted: Mon Apr 15, 2019 2:06 pm
by mkeey
Tried the first part and got this...
[root@NAGIOSXISERVER]:[/root]# echo 'repair table nagios_servicestatus use_frm;' | mysql -t -u root -pnagiosxi nagios
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Server has since crashed and we're trying to get it back up so the "tail" command hasn't been issued.
Re: SQL Error
Posted: Mon Apr 15, 2019 2:12 pm
by mkeey
Problem is resolved. Found we had to Stop the DB first and then run the Repair and then Start the DB.
1) systemctl stop mariadb
2) /usr/local/nagiosxi/scripts/repair_databases.sh
3) systemctl start mariadb
Please close the case as resolved.
Re: SQL Error
Posted: Mon Apr 15, 2019 2:26 pm
by benjaminsmith
Hi
@mkeey,
Problem is resolved. Found we had to Stop the DB first and then run the Repair and then Start the DB.
Good to hear you got it working again. We'll mark this thread as closed. If you have further issues, just start a new thread.
Thanks!