문제

I have successfully setup ndbcluster version 7.1.26. This contains 2 data nodes[NDBD], 2 mysql [MYSQLD] nodes and one management [MGMD] node. Replication works successfully. My Web application is deployed in JBoss-5.0.1 and using JNDI for connection resources which are specified in application specific ds.xml file in load balanced url forms e.g. jbdc:mysql:loadbalance:host1:port1,host2:port2/databaseName.

host1 : refers to first mysqld node and port1 refers the port it is running on. host2 : refers to second mysqld node and port2 refers the port it is running on.

When both of the [MySQLD] nodes are up and running everything works fine and cluster responds well, replicates data, and data retrieval operations also work properly.

But issues are raised when any of the [MySQLD] nodes goes down. Data gets inserted/updated/replicated but the application is unable to retrieve data from cluster and web page remains busy working which means busy retrieving data. As soon as the node which was down goes up it responds properly and application goes forward and shows up data retrieved from cluster.

At JBoss 5.0.1 startup it showed up a NullPointerException in class LoadBalancingConnectionProxy.invoke(LoadBalancingConnectionProxy.java:439). Tell me if the above Exception plays any role in the above explained issues.

If anyone had faced issues like above and if has any solution regarding the issues please let me know.

Thanks and regards.

도움이 되었습니까?

해결책

I have resolved the issue as it was a bug in the connectorJ's version. As The project I am working on was already using both the buggy jar mysql-connector-java-5.0.8.jar and the jar version in which the issue is already resolved i.e. mysql-connector-java-5.1.13-bin.jar. After all the search when I removed the jar mysql-connector-java-5.0.8.jar my issues got resolved. All that was problematic was that the ConnectorJ/Driver was getting referred from the buggy jar. The bug id and url which refers to this issue is: http://bugs.mysql.com/bug.php?id=31053 .

Thanks for considerations.

다른 팁

Are you using different userids and passwords for each of the hosts(host1, host2) specified in the tag ? (Either directly or using tag) ?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top