Nagios Xi Database Error
Posted: Tue Feb 02, 2021 1:23 am
Hi,
I am unable to launch Nagios console , getting the below error
"Database 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"
I have executed the command "/usr/local/nagiosxi/scripts/repair_databases.sh", but it got failed with the below is the output.
Please help to fix the issue.
touch: cannot touch ‘/usr/local/nagiosxi/scripts/repair_databases.lock’: Read-only file system
DATABASE: nagios
TABLE:
rm: cannot remove ‘/var/lib/mysql/mysql.sock’: Read-only file system
/var/lib/mysql/nagios ~
myisamchk: error: 30 when opening MyISAM-table 'nagios_acknowledgements'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_commands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_commenthistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_comments'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_configfiles'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_configfilevariables'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contact_addresses'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactgroup_members'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contact_notificationcommands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactnotificationmethods'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactnotifications'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactstatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_customvariables'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_customvariablestatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_dbversion'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_downtimehistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_eventhandlers'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_externalcommands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_flappinghistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostchecks'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_host_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_host_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostdependencies'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostescalation_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostescalation_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostescalations'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostgroup_members'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_host_parenthosts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hosts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hoststatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_instances'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_logentries'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_notifications'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_objects'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_processevents'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_programstatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_runtimevariables'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_scheduleddowntime'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicechecks'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_service_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_service_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicedependencies'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_serviceescalation_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_serviceescalation_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_serviceescalations'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicegroup_members'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicegroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_service_parentservices'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_services'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicestatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_statehistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_systemcommands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timedeventqueue'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timedevents'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timeperiods'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timeperiod_timeranges'
Job for mariadb.service failed because a configured resource limit was exceeded. See "systemctl status mariadb.service" and "journalctl -xe" for details.
~
===============
REPAIR COMPLETE
===============
DATABASE: nagiosql
TABLE:
rm: cannot remove ‘/var/lib/mysql/mysql.sock’: Read-only file system
/var/lib/mysql/nagiosql ~
DATABASE: nagiosxi
TABLE:
rm: cannot remove ‘/var/lib/mysql/mysql.sock’: Read-only file system
/var/lib/mysql/nagiosxi ~
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
=======================
nagios database repair FAILED, please check output above!
I am unable to launch Nagios console , getting the below error
"Database 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"
I have executed the command "/usr/local/nagiosxi/scripts/repair_databases.sh", but it got failed with the below is the output.
Please help to fix the issue.
touch: cannot touch ‘/usr/local/nagiosxi/scripts/repair_databases.lock’: Read-only file system
DATABASE: nagios
TABLE:
rm: cannot remove ‘/var/lib/mysql/mysql.sock’: Read-only file system
/var/lib/mysql/nagios ~
myisamchk: error: 30 when opening MyISAM-table 'nagios_acknowledgements'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_commands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_commenthistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_comments'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_configfiles'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_configfilevariables'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contact_addresses'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactgroup_members'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contact_notificationcommands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactnotificationmethods'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactnotifications'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_contactstatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_customvariables'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_customvariablestatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_dbversion'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_downtimehistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_eventhandlers'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_externalcommands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_flappinghistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostchecks'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_host_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_host_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostdependencies'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostescalation_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostescalation_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostescalations'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostgroup_members'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hostgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_host_parenthosts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hosts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_hoststatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_instances'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_logentries'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_notifications'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_objects'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_processevents'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_programstatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_runtimevariables'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_scheduleddowntime'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicechecks'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_service_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_service_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicedependencies'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_serviceescalation_contactgroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_serviceescalation_contacts'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_serviceescalations'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicegroup_members'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicegroups'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_service_parentservices'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_services'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_servicestatus'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_statehistory'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_systemcommands'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timedeventqueue'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timedevents'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timeperiods'
---------
myisamchk: error: 30 when opening MyISAM-table 'nagios_timeperiod_timeranges'
Job for mariadb.service failed because a configured resource limit was exceeded. See "systemctl status mariadb.service" and "journalctl -xe" for details.
~
===============
REPAIR COMPLETE
===============
DATABASE: nagiosql
TABLE:
rm: cannot remove ‘/var/lib/mysql/mysql.sock’: Read-only file system
/var/lib/mysql/nagiosql ~
DATABASE: nagiosxi
TABLE:
rm: cannot remove ‘/var/lib/mysql/mysql.sock’: Read-only file system
/var/lib/mysql/nagiosxi ~
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
=======================
nagios database repair FAILED, please check output above!