Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.7.5
-
Fix Version/s: None
-
Component/s: aurora
-
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 with this configuration fail-over is nog longer possible and therefore this is just a workaround.