MySQL is trying to open a table handle but the .ibd file does not exist

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
4610silbro
Posts: 46
Joined: Fri Sep 12, 2014 11:19 pm

MySQL is trying to open a table handle but the .ibd file does not exist

Postby 4610silbro » Tue Jul 10, 2012 12:02 pm

Hi everybody
So I have a problem with the mysql database of zimbra because our hoster had a server crash. I see the following error in the mysql log file:
120710 18:11:54  InnoDB: error: space object of table'mboxgroup57/imap_folder',

InnoDB: space id 2192 did not exist in memory. Retrying an open.

InnoDB: Error: space id in fsp header 1326254643, but in the page header 926233168

120710 18:11:54 InnoDB: Error: tablespace id and flags in file './mboxgroup57/imap_folder.ibd' are 18446744073709551615 and 1800941417, but in the InnoDB

InnoDB: data dictionary they are 2192 and 0.

InnoDB: Have you moved InnoDB .ibd files around without using the

InnoDB: commands DISCARD TABLESPACE and IMPORT TABLESPACE?

InnoDB: Please refer to

InnoDB: http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting-datadict.html

InnoDB: for how to resolve the issue.

120710 18:15:39 [ERROR] /opt/zimbra/mysql/libexec/mysqld: Incorrect information in file: './mboxgroup57/imap_folder.frm'

120710 18:19:44 InnoDB: cannot calculate statistics for table mboxgroup45/appointment

InnoDB: because the .ibd file is missing. For help, please refer to

InnoDB: http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html">http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html

120710 18:19:44 [ERROR] MySQL is trying to open a table handle but the .ibd file for

table mboxgroup45/appointment does not exist.

Have you deleted the .ibd file from the database directory under

the MySQL datadir, or have you used DISCARD TABLESPACE?

See http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html">http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html

how you can resolve the problem.

It seems that 2 tables are affected. The mysql database is still working but it crashes often when users are working. I have visited the pages that the log sais but the information there, especially
[QUOTE]

Create a matching .frm file in some other database directory and copy it to the database directory where the orphan table is located.
Issue DROP TABLE for the original table. That should successfully drop the table and InnoDB should print a warning to the error log that the .ibd file was missing.

[/QUOTE]
is not sufficient for me. I don't know how to create a .frm file in another db directory. I barely have a clue about mysql. When I try
/opt/zimbra/mysql/bin/mysqlcheck -c --databases mboxgroup57 mboxgroup45 --socket /opt/zimbra/db/mysql.sock 
it sais I need to use the option password, which is ironic because I don't know the zimbra password and the root user doesn't have access to the db. What can I do? I'm really lost here especially because it is a productive server with many users and my time windows I get to work on the problem are always limited. I haven't tried the disaster recovery described in the wiki because 1) I don't know for which versions it acually works 2) I'm afraid nothing will work afterwards.
Thank you so so much in advance for helping me. If you need any information just tell me and I'll try to get it.
cheers


4610silbro
Posts: 46
Joined: Fri Sep 12, 2014 11:19 pm

MySQL is trying to open a table handle but the .ibd file does not exist

Postby 4610silbro » Fri Jul 13, 2012 5:31 am

I solved the problem by reinstalling the server from scratch. I made a ticket in the zimbra support portal. They said that the MySQL Database seems to be corrupt. Instead of dumping and trying to recover the db (since I already have tried so many things) I just started getting the latest backup and setup the server again. In other words I couldn't solve the problem.
cheers
stegbth
Advanced member
Advanced member
Posts: 141
Joined: Fri Sep 12, 2014 11:48 pm
Location: Bavaria in Germany

MySQL is trying to open a table handle but the .ibd file does not exist

Postby stegbth » Fri Jul 13, 2012 12:49 pm

hi,
i had already a similar trouble with zimbra. My mysql database was crashed.

The mailstore was full ok,
but i was unable to restore the complete database with zimbra support.

In the end the server cleaned up about 20GB of email out of mailstore.
i can only recommend everybody to save the mysqldatabase separatly,
[QUOTE]zmlocalconfig -e mysql_backup_retention=3[/QUOTE]
or via

[QUOTE]

/opt/zimbra/mysql/bin/mysqldump --user=root --password=$mysql_root_password --socket=$mysql_socket

--all-databases --single-transaction --flush-logs > {dump-file}.sql

[/QUOTE]
see


best">http://wiki.zimbra.com/wiki/MySQL_Backup_and_Restore
best
regards

thomas
Release 8.6.0.GA.1153.UBUNTU14.64 FOSS edition, Patch 8.6.0_P6

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 8 guests