Page 1 of 2
ndo2db error in /var/log/message
Posted: Tue Jan 06, 2015 1:33 am
by sagarjatti
Hi All,
We are getting some error messages in /var/log/messages like as below.
ndo2db : MYSQL Error : ' incorrect file format 'nagios_systemcommands' '
Can anyone help me to fix this issue? I tried to repair the this table and entire nagios but there is no luck for me.
YOur immediate help will be appreciated much ...

Re: ndo2db error in /var/log/message
Posted: Tue Jan 06, 2015 10:35 am
by scottwilkerson
By default XI systems have this DB backed up in
/store/backups/mysql/daily/nagios
/store/backups/mysql/weekly/nagios
/store/backups/mysql/monthly/nagios
Do you have these?
If so they are just gzip, and are created on a daily cron, here is an example restore of the nagios DB
Code: Select all
[root@localhost nagios]# cd /store/backups/mysql/daily/nagios
[root@localhost nagios]# ls -l
total 28264
-rw-r--r-- 1 root root 4421384 Apr 12 07:00 nagios_2013-04-12_07h00m.Friday.sql.gz
-rw-r--r-- 1 root root 4692986 Apr 17 07:00 nagios_2013-04-17_07h00m.Wednesday.sql.gz
-rw-r--r-- 1 root root 4789457 Apr 18 07:00 nagios_2013-04-18_07h00m.Thursday.sql.gz
-rw-r--r-- 1 root root 4941059 Apr 21 07:00 nagios_2013-04-21_07h00m.Sunday.sql.gz
-rw-r--r-- 1 root root 4998263 Apr 22 07:00 nagios_2013-04-22_07h00m.Monday.sql.gz
-rw-r--r-- 1 root root 5084448 Apr 23 07:00 nagios_2013-04-23_07h00m.Tuesday.sql.gz
[root@localhost nagios]# gunzip nagios_2013-04-23_07h00m.Tuesday.sql.gz
[root@localhost nagios]# cat nagios_2013-04-23_07h00m.Tuesday.sql | mysql -pnagiosxi nagios
Re: ndo2db error in /var/log/message
Posted: Wed Jan 07, 2015 1:32 am
by sagarjatti
Hi Scottwilkerson,
Thank you for your response, i am having this kind of error messages in /var/log/messages from last 1 month or so . I just want to know how can i fix nagios_systemcommands table which is showing as "Incorrect file format".
If i restore the backup file it is same error we will be having in logs again because this error is appearing from last 1 month or so.
Could you please help me to fix this issue bu repairing the table?i tried to repair it but no luck
Thanks in Advance...

your help will be appreciated much
Regards,
Sagar
Re: ndo2db error in /var/log/message
Posted: Wed Jan 07, 2015 5:51 pm
by lmiltchev
How did you repair the database? Did you run the following commands?
Code: Select all
cd /usr/local/nagiosxi/scripts
./repairmysql.sh nagios
Do you have any errors in the mysqld.log at the moment?
What is the output of the following command?
Code: Select all
echo 'check table nagios_systemcommands;' | mysql -t -pnagiosxi nagios
Re: ndo2db error in /var/log/message
Posted: Thu Jan 08, 2015 2:59 am
by sagarjatti
Hi lmiltchev,
* Yes i do repair table by using repairmysql.sh script .
* I don't see any error message in /var/log/mysqld.log
* when i ru nthe command i get below output
-----------------------------------------------------------------------------------------------------------------------------
Table | Op | Msg Type | Msg_text |
-----------------------------------------------------------------------------------------------------------------------------nagios.nagios_systemcommands | Check | Error | Incorrect File format 'nagios_systemcommands' |
nagios.nagios_systemcommands | Check | Error | Corrupt |
-----------------------------------------------------------------------------------------------------------------------------
Regards,
Sagar
Re: ndo2db error in /var/log/message
Posted: Thu Jan 08, 2015 1:12 pm
by abrist
Try the following command:
Code: Select all
echo "repair table nagios.nagios_systemcommands use_frm;" | mysql -pnagiosxi
Re: ndo2db error in /var/log/message
Posted: Fri Jan 09, 2015 5:56 am
by sagarjatti
Hi abrist,
I ran the command as you provided and for miute or so there was no erros in the /var/log/messages but after some time again it started giving same error
"localhost ndo2db: mysql_error ' Incorrect file format 'nagios_systemcommands' ' "
Re: ndo2db error in /var/log/message
Posted: Fri Jan 09, 2015 3:03 pm
by sreinhardt
Let's check the most common cause of this:
Re: ndo2db error in /var/log/message
Posted: Wed Jan 14, 2015 8:39 am
by sagarjatti
There is enough space in the disk i don't think these commands will help.
Re: ndo2db error in /var/log/message
Posted: Wed Jan 14, 2015 10:39 am
by tmcdonald
There may be enough space, but if you have many, many small files then you may be out of inodes. The "df -i" command will show this.