[CONJ-824] Aurora db connection with maria driver after minor version upgrade Created: 2020-08-29 Updated: 2021-05-17 Resolved: 2021-05-17 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | aurora, JDBC compatibility |
| Affects Version/s: | 2.6.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Heungsu Ha | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Aurora mysql 2.07.2 |
||
| Attachments: |
|
| Description |
|
When I connect to Aurora Mysql 2.07.2 using route53 cname, error occurred. I made simple java code like this. (It is not easy to read and I attached the source code file to this issue.) import java.sql.*; ---execution error is like this. java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=slavedb.hhs.local)(port=3306)(type=master) : (conn=816) could not load system variables at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73) at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:192) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1372) at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635) at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150) at org.mariadb.jdbc.Driver.connect(Driver.java:89) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at mysqlconn2.main(mysqlconn2.java:17)Caused by: java.sql.SQLNonTransientConnectionException: (conn=816) could not load system variables at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73) at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:183) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:1093) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.additionalData(AbstractConnectProtocol.java:1106) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.postConnectionQueries(AbstractConnectProtocol.java:880) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:588) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1367) ... 6 moreCaused by: java.sql.SQLNonTransientConnectionException: (conn=816) Connection is closed at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73) at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:187) at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.cmdPrologue(AbstractQueryProtocol.java:1940) at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:249) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:1068) ... 10 more I tried to use aurora option and result is also same:error.But replication option worked, but slow. In 2.04.8 of Aurora DB, there is no problem connecting to db with this url. I guess this problem is caused by that maria driver can't support the recent version of aurora mysql (over 2.04.8). Today, I compiled source of maria 2.6.2 connector/j and tried to find when this error occurred. Best Regards, |
| Comments |
| Comment by Heungsu Ha [ 2020-09-03 ] |
|
I solved the issue by adding URL with "&usePipelineAuth=false". |
| Comment by Diego Dupin [ 2020-09-03 ] |
|
pipeline consist to send multiple queries and then only read multiple responses. Aurora proxy has a known race condition issue that results in skipping other queries in proxy buffer. connection might be in hang waiting for query response. During authentication, socket has a timeout, that will result throwing the error you describe. So if `usePipelineAuth` or `useBatchMultiSend` is enable, it might work ... or not. All pipeline options (`usePipelineAuth` and `useBatchMultiSend`) must be disabled when using aurora. Problem has been reported to aurora a few times without correction. |
| Comment by Heungsu Ha [ 2020-09-08 ] |
|
Thank you for the answer. |
| Comment by László Végh [ 2020-09-28 ] |
|
I ran into this issue today using driver version 2.7.0. |
| Comment by Diego Dupin [ 2021-05-17 ] |
|
Since we have no Aurora server to try to reproduced that, i'll close this issue. Feel free to create a new ticket link to this one if reproduced even with those options. |