Config Error after rename

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Config Error after rename

Post by tgriep »

Sounds like the MYSQL database has a corrupt table. Try running command a few times to fix it.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql
Then run the following and post back the results.

Code: Select all

tail -50 /var/log/mysqld
df -h
df -i
Be sure to check out our Knowledgebase for helpful articles and solutions!
notverynick
Posts: 62
Joined: Wed Jun 13, 2012 8:47 am

Re: Config Error after rename

Post by notverynick »

Cheers, I was refreshing the 1st page of this thread all afternoon yesterday afternoon thinking you'd not responded :roll:

Tail:

[root@localhost ~]# tail -50 /var/log/mysqld.log
150717 15:21:04 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:18 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:21:48 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:03 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:05 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:18 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:18 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:18 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:33 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:35 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150717 15:22:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:48 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:22:48 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:03 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:17 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:18 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:32 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:33 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:47 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:23:48 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
150717 15:24:25 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150717 15:25:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed

DF:

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
20G 9.5G 8.9G 52% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda1 97M 26M 67M 28% /boot
You have new mail in /var/spool/mail/root

[root@localhost ~]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
20272868 9947032 9301556 52% /
tmpfs 2009760 0 2009760 0% /dev/shm
/dev/sda1 99150 26053 67977 28% /boot


Thanks
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Config Error after rename

Post by tgriep »

Did you run the database repair command like below?

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql
Be sure to check out our Knowledgebase for helpful articles and solutions!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Config Error after rename

Post by abrist »

Repair those two tables directly with (may take a few minutes):

Code: Select all

echo "repair table nagios.nagios_logentries;" | mysql -pnagiosxi
echo "repair table nagios.nagios_systemcommands;" | mysql -pnagiosxi
Once complete, wait five minutes and check the log:

Code: Select all

tail /var/log/mysqld.log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
notverynick
Posts: 62
Joined: Wed Jun 13, 2012 8:47 am

Re: Config Error after rename

Post by notverynick »

Yes sorry and your post seemed to suggest running it more than once so I did it twice...

[root@localhost ~]# mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql
nagios.nagios_acknowledgements OK
nagios.nagios_commands OK
nagios.nagios_commenthistory OK
nagios.nagios_comments OK
nagios.nagios_configfiles OK
nagios.nagios_configfilevariables OK
nagios.nagios_conninfo OK
nagios.nagios_contact_addresses OK
nagios.nagios_contact_notificationcommands OK
nagios.nagios_contactgroup_members OK
nagios.nagios_contactgroups OK
nagios.nagios_contactnotificationmethods OK
nagios.nagios_contactnotifications OK
nagios.nagios_contacts OK
nagios.nagios_contactstatus OK
nagios.nagios_customvariables OK
nagios.nagios_customvariablestatus OK
nagios.nagios_dbversion OK
nagios.nagios_downtimehistory OK
nagios.nagios_eventhandlers OK
nagios.nagios_externalcommands OK
nagios.nagios_flappinghistory OK
nagios.nagios_host_contactgroups OK
nagios.nagios_host_contacts OK
nagios.nagios_host_parenthosts OK
nagios.nagios_hostchecks OK
nagios.nagios_hostdependencies OK
nagios.nagios_hostescalation_contactgroups OK
nagios.nagios_hostescalation_contacts OK
nagios.nagios_hostescalations OK
nagios.nagios_hostgroup_members OK
nagios.nagios_hostgroups OK
nagios.nagios_hosts OK
nagios.nagios_hoststatus OK
nagios.nagios_instances OK
nagios.nagios_logentries
error : Can't create new tempfile: './nagios/nagios_logentries.TMD'
status : Operation failed
nagios.nagios_notifications OK
nagios.nagios_objects OK
nagios.nagios_processevents OK
nagios.nagios_programstatus OK
nagios.nagios_runtimevariables OK
nagios.nagios_scheduleddowntime OK
nagios.nagios_service_contactgroups OK
nagios.nagios_service_contacts OK
nagios.nagios_service_parentservices OK
nagios.nagios_servicechecks OK
nagios.nagios_servicedependencies OK
nagios.nagios_serviceescalation_contactgroups OK
nagios.nagios_serviceescalation_contacts OK
nagios.nagios_serviceescalations OK
nagios.nagios_servicegroup_members OK
nagios.nagios_servicegroups OK
nagios.nagios_services OK
nagios.nagios_servicestatus OK
nagios.nagios_statehistory OK
nagios.nagios_systemcommands
info : Found block that points outside data file at 28552
status : OK
nagios.nagios_timedeventqueue OK
nagios.nagios_timedevents OK
nagios.nagios_timeperiod_timeranges OK
nagios.nagios_timeperiods OK
nagiosql.tbl_command OK
nagiosql.tbl_contact OK
nagiosql.tbl_contactgroup OK
nagiosql.tbl_contacttemplate OK
nagiosql.tbl_domain OK
nagiosql.tbl_host OK
nagiosql.tbl_hostdependency OK
nagiosql.tbl_hostescalation OK
nagiosql.tbl_hostextinfo OK
nagiosql.tbl_hostgroup OK
nagiosql.tbl_hosttemplate OK
nagiosql.tbl_info OK
nagiosql.tbl_lnkContactToCommandHost OK
nagiosql.tbl_lnkContactToCommandService OK
nagiosql.tbl_lnkContactToContactgroup OK
nagiosql.tbl_lnkContactToContacttemplate OK
nagiosql.tbl_lnkContactToVariabledefinition OK
nagiosql.tbl_lnkContactgroupToContact OK
nagiosql.tbl_lnkContactgroupToContactgroup OK
nagiosql.tbl_lnkContacttemplateToCommandHost OK
nagiosql.tbl_lnkContacttemplateToCommandService OK
nagiosql.tbl_lnkContacttemplateToContactgroup OK
nagiosql.tbl_lnkContacttemplateToContacttemplate OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact OK
nagiosql.tbl_lnkHostToContactgroup OK
nagiosql.tbl_lnkHostToHost OK
nagiosql.tbl_lnkHostToHostgroup OK
nagiosql.tbl_lnkHostToHosttemplate OK
nagiosql.tbl_lnkHostToVariabledefinition OK
nagiosql.tbl_lnkHostdependencyToHost_DH OK
nagiosql.tbl_lnkHostdependencyToHost_H OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H OK
nagiosql.tbl_lnkHostescalationToContact OK
nagiosql.tbl_lnkHostescalationToContactgroup OK
nagiosql.tbl_lnkHostescalationToHost OK
nagiosql.tbl_lnkHostescalationToHostgroup OK
nagiosql.tbl_lnkHostgroupToHost OK
nagiosql.tbl_lnkHostgroupToHostgroup OK
nagiosql.tbl_lnkHosttemplateToContact OK
nagiosql.tbl_lnkHosttemplateToContactgroup OK
nagiosql.tbl_lnkHosttemplateToHost OK
nagiosql.tbl_lnkHosttemplateToHostgroup OK
nagiosql.tbl_lnkHosttemplateToHosttemplate OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition OK
nagiosql.tbl_lnkServiceToContact OK
nagiosql.tbl_lnkServiceToContactgroup OK
nagiosql.tbl_lnkServiceToHost OK
nagiosql.tbl_lnkServiceToHostgroup OK
nagiosql.tbl_lnkServiceToServicegroup OK
nagiosql.tbl_lnkServiceToServicetemplate OK
nagiosql.tbl_lnkServiceToVariabledefinition OK
nagiosql.tbl_lnkServicedependencyToHost_DH OK
nagiosql.tbl_lnkServicedependencyToHost_H OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H OK
nagiosql.tbl_lnkServicedependencyToService_DS OK
nagiosql.tbl_lnkServicedependencyToService_S OK
nagiosql.tbl_lnkServiceescalationToContact OK
nagiosql.tbl_lnkServiceescalationToContactgroup OK
nagiosql.tbl_lnkServiceescalationToHost OK
nagiosql.tbl_lnkServiceescalationToHostgroup OK
nagiosql.tbl_lnkServiceescalationToService OK
nagiosql.tbl_lnkServicegroupToService OK
nagiosql.tbl_lnkServicegroupToServicegroup OK
nagiosql.tbl_lnkServicetemplateToContact OK
nagiosql.tbl_lnkServicetemplateToContactgroup OK
nagiosql.tbl_lnkServicetemplateToHost OK
nagiosql.tbl_lnkServicetemplateToHostgroup OK
nagiosql.tbl_lnkServicetemplateToServicegroup OK
nagiosql.tbl_lnkServicetemplateToServicetemplate OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook OK
nagiosql.tbl_mainmenu OK
nagiosql.tbl_service OK
nagiosql.tbl_servicedependency OK
nagiosql.tbl_serviceescalation OK
nagiosql.tbl_serviceextinfo OK
nagiosql.tbl_servicegroup OK
nagiosql.tbl_servicetemplate OK
nagiosql.tbl_settings OK
nagiosql.tbl_submenu OK
nagiosql.tbl_timedefinition OK
nagiosql.tbl_timeperiod OK
nagiosql.tbl_user OK
nagiosql.tbl_variabledefinition OK



[root@localhost ~]# mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql
nagios.nagios_acknowledgements OK
nagios.nagios_commands OK
nagios.nagios_commenthistory OK
nagios.nagios_comments OK
nagios.nagios_configfiles OK
nagios.nagios_configfilevariables OK
nagios.nagios_conninfo OK
nagios.nagios_contact_addresses OK
nagios.nagios_contact_notificationcommands OK
nagios.nagios_contactgroup_members OK
nagios.nagios_contactgroups OK
nagios.nagios_contactnotificationmethods OK
nagios.nagios_contactnotifications OK
nagios.nagios_contacts OK
nagios.nagios_contactstatus OK
nagios.nagios_customvariables OK
nagios.nagios_customvariablestatus OK
nagios.nagios_dbversion OK
nagios.nagios_downtimehistory OK
nagios.nagios_eventhandlers OK
nagios.nagios_externalcommands OK
nagios.nagios_flappinghistory OK
nagios.nagios_host_contactgroups OK
nagios.nagios_host_contacts OK
nagios.nagios_host_parenthosts OK
nagios.nagios_hostchecks OK
nagios.nagios_hostdependencies OK
nagios.nagios_hostescalation_contactgroups OK
nagios.nagios_hostescalation_contacts OK
nagios.nagios_hostescalations OK
nagios.nagios_hostgroup_members OK
nagios.nagios_hostgroups OK
nagios.nagios_hosts OK
nagios.nagios_hoststatus OK
nagios.nagios_instances OK
nagios.nagios_logentries
error : Can't create new tempfile: './nagios/nagios_logentries.TMD'
status : Operation failed
nagios.nagios_notifications OK
nagios.nagios_objects OK
nagios.nagios_processevents OK
nagios.nagios_programstatus OK
nagios.nagios_runtimevariables OK
nagios.nagios_scheduleddowntime OK
nagios.nagios_service_contactgroups OK
nagios.nagios_service_contacts OK
nagios.nagios_service_parentservices OK
nagios.nagios_servicechecks OK
nagios.nagios_servicedependencies OK
nagios.nagios_serviceescalation_contactgroups OK
nagios.nagios_serviceescalation_contacts OK
nagios.nagios_serviceescalations OK
nagios.nagios_servicegroup_members OK
nagios.nagios_servicegroups OK
nagios.nagios_services OK
nagios.nagios_servicestatus OK
nagios.nagios_statehistory OK
nagios.nagios_systemcommands OK
nagios.nagios_timedeventqueue OK
nagios.nagios_timedevents OK
nagios.nagios_timeperiod_timeranges OK
nagios.nagios_timeperiods OK
nagiosql.tbl_command OK
nagiosql.tbl_contact OK
nagiosql.tbl_contactgroup OK
nagiosql.tbl_contacttemplate OK
nagiosql.tbl_domain OK
nagiosql.tbl_host OK
nagiosql.tbl_hostdependency OK
nagiosql.tbl_hostescalation OK
nagiosql.tbl_hostextinfo OK
nagiosql.tbl_hostgroup OK
nagiosql.tbl_hosttemplate OK
nagiosql.tbl_info OK
nagiosql.tbl_lnkContactToCommandHost OK
nagiosql.tbl_lnkContactToCommandService OK
nagiosql.tbl_lnkContactToContactgroup OK
nagiosql.tbl_lnkContactToContacttemplate OK
nagiosql.tbl_lnkContactToVariabledefinition OK
nagiosql.tbl_lnkContactgroupToContact OK
nagiosql.tbl_lnkContactgroupToContactgroup OK
nagiosql.tbl_lnkContacttemplateToCommandHost OK
nagiosql.tbl_lnkContacttemplateToCommandService OK
nagiosql.tbl_lnkContacttemplateToContactgroup OK
nagiosql.tbl_lnkContacttemplateToContacttemplate OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact OK
nagiosql.tbl_lnkHostToContactgroup OK
nagiosql.tbl_lnkHostToHost OK
nagiosql.tbl_lnkHostToHostgroup OK
nagiosql.tbl_lnkHostToHosttemplate OK
nagiosql.tbl_lnkHostToVariabledefinition OK
nagiosql.tbl_lnkHostdependencyToHost_DH OK
nagiosql.tbl_lnkHostdependencyToHost_H OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H OK
nagiosql.tbl_lnkHostescalationToContact OK
nagiosql.tbl_lnkHostescalationToContactgroup OK
nagiosql.tbl_lnkHostescalationToHost OK
nagiosql.tbl_lnkHostescalationToHostgroup OK
nagiosql.tbl_lnkHostgroupToHost OK
nagiosql.tbl_lnkHostgroupToHostgroup OK
nagiosql.tbl_lnkHosttemplateToContact OK
nagiosql.tbl_lnkHosttemplateToContactgroup OK
nagiosql.tbl_lnkHosttemplateToHost OK
nagiosql.tbl_lnkHosttemplateToHostgroup OK
nagiosql.tbl_lnkHosttemplateToHosttemplate OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition OK
nagiosql.tbl_lnkServiceToContact OK
nagiosql.tbl_lnkServiceToContactgroup OK
nagiosql.tbl_lnkServiceToHost OK
nagiosql.tbl_lnkServiceToHostgroup OK
nagiosql.tbl_lnkServiceToServicegroup OK
nagiosql.tbl_lnkServiceToServicetemplate OK
nagiosql.tbl_lnkServiceToVariabledefinition OK
nagiosql.tbl_lnkServicedependencyToHost_DH OK
nagiosql.tbl_lnkServicedependencyToHost_H OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H OK
nagiosql.tbl_lnkServicedependencyToService_DS OK
nagiosql.tbl_lnkServicedependencyToService_S OK
nagiosql.tbl_lnkServiceescalationToContact OK
nagiosql.tbl_lnkServiceescalationToContactgroup OK
nagiosql.tbl_lnkServiceescalationToHost OK
nagiosql.tbl_lnkServiceescalationToHostgroup OK
nagiosql.tbl_lnkServiceescalationToService OK
nagiosql.tbl_lnkServicegroupToService OK
nagiosql.tbl_lnkServicegroupToServicegroup OK
nagiosql.tbl_lnkServicetemplateToContact OK
nagiosql.tbl_lnkServicetemplateToContactgroup OK
nagiosql.tbl_lnkServicetemplateToHost OK
nagiosql.tbl_lnkServicetemplateToHostgroup OK
nagiosql.tbl_lnkServicetemplateToServicegroup OK
nagiosql.tbl_lnkServicetemplateToServicetemplate OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook OK
nagiosql.tbl_mainmenu OK
nagiosql.tbl_service OK
nagiosql.tbl_servicedependency OK
nagiosql.tbl_serviceescalation OK
nagiosql.tbl_serviceextinfo OK
nagiosql.tbl_servicegroup OK
nagiosql.tbl_servicetemplate OK
nagiosql.tbl_settings OK
nagiosql.tbl_submenu OK
nagiosql.tbl_timedefinition OK
nagiosql.tbl_timeperiod OK
nagiosql.tbl_user OK
nagiosql.tbl_variabledefinition OK
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Config Error after rename

Post by tgriep »

You can try what abrist posted to fix the table but if that doesn't work, here is an alternate way to repair the mysql database.
Run this from a shell on the XI system

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f *
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
php /usr/local/nagiosxi/cron/dbmaint.php
Be sure to check out our Knowledgebase for helpful articles and solutions!
notverynick
Posts: 62
Joined: Wed Jun 13, 2012 8:47 am

Re: Config Error after rename

Post by notverynick »

The first one gave me an error; output from the second looked clean but here it is regardless.

I think I'm set to re-run the backup script but I'll let you guys give an expert look over before I proceed :)

Attached as it's over 1k lines.

Thanks!
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Config Error after rename

Post by tgriep »

Lets tail the MYSQL log to be sure.
Run this and post back the output.

Code: Select all

tail -50 /var/log/mysqld.log
It it is clean, you should be good to go.
Be sure to check out our Knowledgebase for helpful articles and solutions!
notverynick
Posts: 62
Joined: Wed Jun 13, 2012 8:47 am

Re: Config Error after rename

Post by notverynick »

Sorry I forgot that!

I trimmed off the earlier entries as they were from before the repair, essentially they were the same as the first ones seen here:

150717 16:29:58 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150717 16:30:02 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150717 16:30:13 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150717 16:31:17 [Note] /usr/libexec/mysqld: Normal shutdown

150717 16:31:17 [Note] Event Scheduler: Purging the queue. 0 events
150717 16:31:19 InnoDB: Starting shutdown...
150717 16:31:23 InnoDB: Shutdown completed; log sequence number 0 44233
150717 16:31:23 [Note] /usr/libexec/mysqld: Shutdown complete

150717 16:31:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150717 16:31:45 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150717 16:31:45 InnoDB: Initializing buffer pool, size = 8.0M
150717 16:31:45 InnoDB: Completed initialization of buffer pool
150717 16:31:45 InnoDB: Started; log sequence number 0 44233
150717 16:31:45 [Note] Event Scheduler: Loaded 0 events
150717 16:31:45 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.61' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution


Looks good?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Config Error after rename

Post by tgriep »

Yep, looks good.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked