4 messages in com.mysql.lists.javafailOverReadOnly Failures
FromSent OnAttachments
Bruce Dembecki19 May 2004 11:30 
Mark Matthews19 May 2004 12:41 
Bruce Dembecki19 May 2004 14:10 
Bruce Dembecki20 May 2004 13:17 
Subject:failOverReadOnly Failures
From:Bruce Dembecki (bru@liveworld.com)
Date:05/19/2004 11:30:52 AM
List:com.mysql.lists.java

Hi! We are testing the new failOverReadOnly option in 3.0.12 released this week and are experiencing difficulties. Here is how we have our connection URL setup:

<serverURL>jdbc:mysql://mysql6:3306,mysql1:3306/jive_ebay_sg?autoReconnect=t rue&failOverReadOnly=false&secondsBeforeRetryMaster=2&queriesBeforeRetryMast er=100&maxReconnects=10000&connectTimeout=1000&initialTimeout=2&socketTimeou t=1000&autoReconnectForPools=true</serverURL>

This is the final URL we tried, there were others, including with the server set to mysql6,mysql1:3306 so that the port number is specified after the various servers, also without the port number at all. We also tried with and without autoReconnectForPools=true, and with different values in the various timeouts, and without the various timeouts.

In all cases our test case here is to fire up the application, see that it works, and simply send mysql6 a shutdown command (this is better than a power failure or something abrupt and without notice, because at least this way mysql will kill the connections cleanly rather than disappearing leaving the JDBC connection in the ether somewhere).

In all cases we do not successfully reconnect to mysql1. We get errors in the error log, which I will paste a sample of below. As soon as I start mysql6 again everything works wonderfully (so it is trying to reconnect to something).

So, is it something I have done wrong in the Connection URL, or is there an issue with the failover redundancy stuff.

Best Regards, Bruce

java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1373) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1517) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1908) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1257) at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218) at com.mysql.jdbc.Connection.execSQL(Connection.java:2239) at com.mysql.jdbc.Connection.execSQL(Connection.java:2187) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158) at com.mysql.jdbc.DatabaseMetaData.getUserName(DatabaseMetaData.java:4922) at _admin._database__jsp._jspService(/usr/local/webapps/ebdbsg/admin/database.j sp:141) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:536)

** END NESTED EXCEPTION **

at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1692) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1908) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1257) at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218) at com.mysql.jdbc.Connection.execSQL(Connection.java:2239) at com.mysql.jdbc.Connection.execSQL(Connection.java:2187) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158) at com.mysql.jdbc.DatabaseMetaData.getUserName(DatabaseMetaData.java:4922) at _admin._database__jsp._jspService(/usr/local/webapps/ebdbsg/admin/database.j sp:141) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:536)