MySQL Forums :: Utilities :: Connector/J fails if fabric node is not available


Advanced Search

Connector/J fails if fabric node is not available
Posted by: Lefteris Koutsoloukas ()
Date: June 10, 2016 07:30AM

Hi,

according to Fabric 1.5 FAQ 8.10.8, if the fabric node becomes unavailable connectors will continue to provide connections to a cached copy of the primary node. The FAQ is available here: http://dev.mysql.com/doc/mysql-utilities/1.5/en/fabric-faq.html#fabric-faq-ha
In my test setup I see that Connector/J does not behave like that, it fails as soon as the fabric node becomes unavailable.

Test setup:

Fabric 1.5 installed on a VM running CentOS 7
Two mysql 5.7 community servers installed on two CentOS 7 VMs
Connector/J is version 5.1.39
The application is deployed on Tomcat 8 running in Windows 7 and it is using Hibernate 4.3.1 to connect to the fabric node.
The JDBC URL looks like this: jdbc:mysql:fabric://192.168.235.4:32274/mydb?fabricServerGroup=mygrp&fabricUsername=admin&fabricPassword=secret

Everything works as expected with the db nodes, I can switch primary and secondary manually, I can shut down the primary node, I can reconnect it as secondary to the HA group etc. But if I shutdown the fabric process on the fabric node I get this exception:

WARN [2016-06-10 14:09:00] [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:144] [nqp5rATecQEwbpCCrfnd] - SQL Error: 0, SQLState: null
ERROR [2016-06-10 14:09:00] [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:146] [nqp5rATecQEwbpCCrfnd] - Unable to establish connection to the Fabric server

If the FAQ is correct, I would expect Connector/J to continue providing connections to the primary of the HA group, using the cached info of which is primary and which secondary.

Any thoughts anyone? Is the FAQ wrong or is some connector/J bug or configuration missing?

Thanks
Lefteris

Options: ReplyQuote


Subject Views Written By Posted
Connector/J fails if fabric node is not available 1078 Lefteris Koutsoloukas 06/10/2016 07:30AM
Re: Connector/J fails if fabric node is not available 383 Filipe Silva 06/16/2016 09:14AM


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.