db maintenance will not run, Nagios crashes after ~1 hour
Posted: Tue Jun 11, 2019 10:15 am
Hello,
Having some difficulties with one of my Nagios instances. Any attempt to run the database repair script simply results in more failures and errors, and ends up filling up /var on my server.
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
- recovering (with sort) MyISAM-table 'tbl_user.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2
/usr/bin/myisamchk: Can't change ownership of the file '/var/lib/mysql/nagiosql/tbl_user.MYD' (Errcode: 1)
myisamchk: error: 1 when fixing table
MyISAM-table 'tbl_user.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
---------
- recovering (with sort) MyISAM-table 'tbl_variabledefinition.MYI'
Data records: 1658
- Fixing index 1
/usr/bin/myisamchk: Can't change ownership of the file '/var/lib/mysql/nagiosql/tbl_variabledefinition.MYD' (Errcode: 1)
myisamchk: error: 1 when fixing table
MyISAM-table 'tbl_variabledefinition.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
Starting mysqld: [ OK ]
/usr/local/nagiosxi/scripts
this has been happening for the last 2 days. A reboot will bring up nagios for a short while, but then it crashes again. I have attempted to manually stop/start all services with the same result.
Please advise....
Having some difficulties with one of my Nagios instances. Any attempt to run the database repair script simply results in more failures and errors, and ends up filling up /var on my server.
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
- recovering (with sort) MyISAM-table 'tbl_user.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2
/usr/bin/myisamchk: Can't change ownership of the file '/var/lib/mysql/nagiosql/tbl_user.MYD' (Errcode: 1)
myisamchk: error: 1 when fixing table
MyISAM-table 'tbl_user.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
---------
- recovering (with sort) MyISAM-table 'tbl_variabledefinition.MYI'
Data records: 1658
- Fixing index 1
/usr/bin/myisamchk: Can't change ownership of the file '/var/lib/mysql/nagiosql/tbl_variabledefinition.MYD' (Errcode: 1)
myisamchk: error: 1 when fixing table
MyISAM-table 'tbl_variabledefinition.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
Starting mysqld: [ OK ]
/usr/local/nagiosxi/scripts
this has been happening for the last 2 days. A reboot will bring up nagios for a short while, but then it crashes again. I have attempted to manually stop/start all services with the same result.
Please advise....