[OpenSIPS-Devel] [ opensips-Bugs-2817434 ] Incorrect key file for table './opensips/active_watchers.MYI
SourceForge.net
noreply at sourceforge.net
Tue Jul 7 17:37:46 CEST 2009
Bugs item #2817434, was opened at 2009-07-06 16:06
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2817434&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.5.x
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Iñaki Baz Castillo (ibc_sf)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Incorrect key file for table './opensips/active_watchers.MYI
Initial Comment:
Using OpenSIPS trunk rev 5738 as presence server.
After restarting MySQL server I get the following errors in the log:
--------------------
Jul 6 12:43:08 myserver /usr/sbin/opensips[30437]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jul 6 12:43:08 myserver /usr/sbin/opensips[30436]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jul 6 12:43:08 myserver /usr/sbin/opensips[30434]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jul 6 12:43:08 myserver /usr/sbin/opensips[30438]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jul 6 12:43:17 myserver /usr/sbin/opensips[30440]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (1210) Incorrect arguments to mysql_stmt_execute
Jul 6 12:43:40 myserver /usr/sbin/opensips[30436]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (1210) Incorrect arguments to mysql_stmt_execute
Jul 6 12:43:40 myserver /usr/sbin/opensips[30437]: ERROR:db_mysql:re_init_statement: failed while mysql_stmt_prepare: (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Jul 6 12:43:40 myserver /usr/sbin/opensips[30437]: ERROR:db_mysql:db_mysql_do_prepared_query: failed to re-init statement!
Jul 6 12:43:40 myserver /usr/sbin/opensips[30437]: ERROR:presence:insert_subs_db: unsuccessful sql insert
Jul 6 12:43:40 myserver /usr/sbin/opensips[30433]: ERROR:db_mysql:re_init_statement: failed while mysql_stmt_prepare: (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Jul 6 12:43:40 myserver /usr/sbin/opensips[30433]: ERROR:db_mysql:db_mysql_do_prepared_query: failed to re-init statement!
Jul 6 12:44:15 myserver /usr/sbin/opensips[30438]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (126) Incorrect key file for table './opensips/active_watchers.MYI'; try to repair it
Jul 6 12:44:15 myserver /usr/sbin/opensips[30438]: ERROR:presence:insert_subs_db: unsuccessful sql insert
Jul 6 12:44:58 myserver /usr/sbin/opensips[30440]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (126) Incorrect key file for table './opensips/active_watchers.MYI'; try to repair it
Jul 6 12:46:38 myserver /usr/sbin/opensips[30440]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (126) Incorrect key file for table './opensips/active_watchers.MYI'; try to repair it
Jul 6 12:48:18 myserver /usr/sbin/opensips[30440]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (126) Incorrect key file for table './opensips/active_watchers.MYI'; try to repair it
Jul 6 12:49:58 myserver /usr/sbin/opensips[30440]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (126) Incorrect key file for table './opensips/active_watchers.MYI'; try to repair it
Jul 6 12:51:38 myserver /usr/sbin/opensips[30440]: ERROR:db_mysql:db_mysql_do_prepared_query: mysql_stmt_execute() failed(2): (126) Incorrect key file for table './opensips/active_watchers.MYI'; try to repair it
[...]
-----------------------------
Note that I restarted MySQL at 12:43.
----------------------------------------------------------------------
>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-07-07 18:37
Message:
yes, that was my impression also while googling for this kind of error.
Maybe changing the default table type to InnoDB will be something smarter
;).
I will close this report - if something new comes up, please re-open it or
open a new one.
Thanks and regards,
Bogdan
----------------------------------------------------------------------
Comment By: Iñaki Baz Castillo (ibc_sf)
Date: 2009-07-07 13:05
Message:
Bogdan, it must be a problem in MyISAM indexes. After dumping the whole
table and regenerating it from the dump file, the error never happens.
Also, in the MySQL bug report I pointed in my first comment, more people
got the same solution (regenerating the table, or using InnoDB).
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-07-07 12:47
Message:
Hi Inaki,
I just backported to 1.5 the fixes from db_mysql (reconnect part) from
trunk - maybe you can give it a try, even if i do not think is related to
this report - I guess something wrong happened with the tables during
restart - the queries done by OpenSIPS cannot bring the table into such
state.
Regards,
Bogdan
----------------------------------------------------------------------
Comment By: Iñaki Baz Castillo (ibc_sf)
Date: 2009-07-06 16:58
Message:
Reparing the table is not enough, it remains occuring (but now "REPAIR
TABLE active_watchers" shows no errors).
I've dumped the table content, deleted it and regenerated from the dump.
Let's see what happens.
----------------------------------------------------------------------
Comment By: Iñaki Baz Castillo (ibc_sf)
Date: 2009-07-06 16:28
Message:
It could be a bug in MySQL MyISAM:
http://forums.mysql.com/read.php?21,50214,50214#msg-50214
Note that if I repair the active_watcher table, it's in fact repaired:
mysql> REPAIR TABLE active_watchers;
+--------------------------+--------+----------+------------------------------------+
| Table | Op | Msg_type | Msg_text
|
+--------------------------+--------+----------+------------------------------------+
| opensips.active_watchers | repair | warning | Number of rows changed
from 6 to 5 |
| opensips.active_watchers | repair | status | OK
|
+--------------------------+--------+----------+------------------------------------+
2 rows in set (0.00 sec)
So, perhaps the table was corrupted and it's not related to OpenSIPS at
all?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2817434&group_id=232389
More information about the Devel
mailing list