[CONJ-944] Unable to acquire failover connection on AWS Aurora RDS global cluster reader instance Created: 2022-03-15  Updated: 2022-08-22

Status: Open
Project: MariaDB Connector/J
Component/s: aurora
Affects Version/s: 2.7.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Rudolf Visagie Assignee: Diego Dupin
Resolution: Unresolved Votes: 0
Labels: JDBC, aurora, aws, reader
Environment:

Ubuntu 20.04.3 LTS

java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment 18.9 (build 11.0.8+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10, mixed mode)



 Description   

When the JDBC url starts with the following: "jdbc:mariadb:aurora://" and an attempt is made to obtain a connection on an AWS Aurora RDS global cluster reader instance, the following failure is observed:

java.sql.SQLException: Communications link failure with primary. No active connection found for master. 
	at org.mariadb.jdbc.internal.failover.AbstractMastersListener.throwFailoverMessage(AbstractMastersListener.java:563)
	at org.mariadb.jdbc.internal.failover.impl.MastersReplicasListener.checkInitialConnection(MastersReplicasListener.java:350)
	at org.mariadb.jdbc.internal.failover.impl.MastersReplicasListener.initializeConnection(MastersReplicasListener.java:179)
	at org.mariadb.jdbc.internal.failover.FailoverProxy.<init>(FailoverProxy.java:120)
	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:608)
	at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)
	at org.mariadb.jdbc.Driver.connect(Driver.java:89)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
	at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71)
	at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726)
	at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

If the same operation with the same JDBC URL is performed against a non-global regional cluster then it succeeds.

If the "aurora" part is removed from the JDBC URL and an attempt is again made to obtain a connection from the global cluster, then it succeeds.

However, according to the documentation, with this configuration fail-over is no longer possible and therefore this is just a workaround.


Generated at Thu Feb 08 03:19:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.