MySQL Forums
Forum List  »  NDB clusters

failover seems like is not working
Posted by: kostya kote
Date: September 16, 2005 11:14AM

Hi.

Database Product: MySQL 4.1.14-max
Connector : mysql-connector-java-3.1.10

I configured cluster with 1 sql node and 2 ndb nodes, 2 replicas.
Then i've read this url
http://dev.mysql.com/doc/connector/j/en/cj-configuration-properties.html
for enabling high availability to removing single point of failure.

As a result, I've got client application, new cluster configuration with 2 sql nodes.
client application use this connection url and properties:
connURL = jdbc:mysql://10.30.1.7, 10.30.1.8/company_db
driver = org.gjt.mm.mysql.Driver
user =root
password =
autoReconnect = true
roundRobinLoadBalance = false
failOverReadOnly = false

So, when 2 sql nodes are up, client app work properly doing some selectes in endless loop. When I stop the sql node at 10.30.1.7 I expect that driver will switch to failover host at 10.30.1.8 but I get only exception:

2005-09-16 21:04:23,276 ERROR testfw : GetAndWriteAndDeleteTrans0:Exception at select:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1902)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2348)
.....

and then while app working in the loop -

2005-09-16 21:04:23,557 ERROR testfw : GetAndWriteAndDeleteTrans0:Exception at select:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: socket write error

STACKTRACE:

java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
.....

What am I doing wrong in my app or in the cluster configuration?

And more. then I start my client app while 1 sql node at 10.30.1.7 is down, I got next error

2005-09-16 19:39:15,187 ERROR testfw : GetAndWriteAndDeleteTrans0:Exception at select:
java.sql.SQLException: Failed to open 'ACC_USER', error while unpacking from engine
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2921)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:930)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1024)
at com.jnetx.testfw.imdb.benchmark.GetAndWriteAndDeleteTrans.execute(GetAndWriteAndDeleteTrans.java:127)
at com.jnetx.testfw.imdb.benchmark.Benchmark.run(Benchmark.java:49)

ACC_USER - it is table which I select in endless loop.

Why I cant unpack table ?


Thanks!



Edited 1 time(s). Last edit at 09/19/2005 02:45AM by kostya kote.

Options: ReplyQuote


Subject
Views
Written By
Posted
failover seems like is not working
4665
September 16, 2005 11:14AM
1968
September 19, 2005 04:26AM
1943
September 19, 2005 06:35AM
1891
September 19, 2005 06:48AM
1866
September 19, 2005 06:53AM
1812
September 19, 2005 07:08AM
1704
September 19, 2005 07:13AM
1909
September 19, 2005 07:42AM
1803
September 19, 2005 07:52AM
1639
September 19, 2005 08:04AM
1738
September 19, 2005 08:24AM
1753
September 19, 2005 08:35AM
1749
September 19, 2005 09:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.