4 messages in com.mysql.lists.javaRe: autoReconnect
FromSent OnAttachments
Gorazd Golob30 Jun 2004 02:57 
Mark Matthews30 Jun 2004 06:22 
Gorazd Golob30 Jun 2004 06:36 
Mark Matthews30 Jun 2004 07:29 
Subject:Re: autoReconnect
From:Mark Matthews (ma@mysql.com)
Date:06/30/2004 06:22:21 AM
List:com.mysql.lists.java

Hi!

We have further problems with autoReconnect. In nightly 3.0 build we found this issue fixed, using enabled autoReconnect: When you make a connection and host1 is down, driver will connect to host2 without exception.

Actual problem now is - when host1 fails during established connection, the driver starts producing exceptions and won't connect to host2.

STACKTRACE:

java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1390) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1534) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1925) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1274) at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1220) at com.mysql.jdbc.Connection.execSQL(Connection.java:2233) at com.mysql.jdbc.Connection.execSQL(Connection.java:2181) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158)

I guess that when using autoReconnect this must work transparently, without exceptions - JDBC driver should reconnect itself to host2, when host1 goes down during connection and user of JDBC shouldn't even noticed it.

Thanks, bye, gorazd

Gorazd,

I can't repeat this on my end (I did the same thing to actually test the fix). Can you spell out the _exact_ steps you're doing, and the exact version of MySQL you are using?

-Mark