[ejabberd] ejabberd fail to reconnect to the database - ODBC - mysql

Krisztian maildir at mko.hu
Wed Oct 9 21:52:51 MSK 2013


Hi,

I have set this parameter in ejabberd.cfg:
{odbc_start_interval, 30}.

Based on the docs:
If the connection to the database fails, ejabberd waits 30 seconds 
before
retrying.

ejabberd is configured to use ODBC for mysql connection:
{auth_method, odbc}, {odbc_server, "DSN=myodbcconnectionname"}

###
1.)
MySQL and ejabberd are stopped.
First start ejabberd.
In log:
=INFO REPORT==== 2013-10-09 19:31:54 ===
I(<0.274.0>:ejabberd_odbc:216) : odbc connection failed:
** Reason: "[unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to local 
MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) SQLSTATE 
IS: 00000 Connection to database failed."
** Retry after: 30 seconds

=INFO REPORT==== 2013-10-09 19:32:24 ===
I(<0.253.0>:ejabberd_odbc:216) : odbc connection failed:
** Reason: "[unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to local 
MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) SQLSTATE 
IS: 00000 Connection to database failed."
** Retry after: 30 seconds

=INFO REPORT==== 2013-10-09 19:32:54 ===
I(<0.253.0>:ejabberd_odbc:216) : odbc connection failed:
** Reason: "[unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to local 
MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) SQLSTATE 
IS: 00000 Connection to database failed."
** Retry after: 30 seconds

OK!

###
2.)
Start MySQL Server. Ejabberd recognize this and connect to MySQL.

OK!

###
3.)
Stop and start MySQL Server so all existing mysql connection are 
terminated.
Ejabberd doesn't retry to connect to the database again.


This problem has been fixed here but it is not working for me: 
https://support.process-one.net/browse/EJAB-764


ejabbed: 2.1.10-4
odbc: libmyodbc 5.1.10-2
MySQL: 5.5.31+dfsg-0+wheezy1
Server: Debian Wheezy

Regards,

Krisztian Kompar


More information about the ejabberd mailing list