Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.0-RC, 1.6.0, 2.0.1
-
None
Description
Environment:
HikariCP version: 2.6.1
JDK version : 1.8.0_125
Database : MySQL
Driver :org.mariadb.jdbc.Driver
Driver version : 2.0.1
Issue:
Running into a weird issue while using HikariCP with mariadb connector. HikariCP pool stuck at start up sequence after I changed com.mysql.jdbc.Driver to org.mariadb.jdbc.Driver
Usage:
String driver = "org.mariadb.jdbc.Driver";
String jdbcUrl = "jdbc:mysql://mysql_host:3306";
Class.forName(driver);
HikariConfig config = new HikariConfig();
config.setDriverClassName(driver);
config.setJdbcUrl(jdbcUrl);
config.setUsername(user);
config.setPassword(password);
config.setConnectionTimeout(30000);
config.setMaximumPoolSize(20);
config.setAutoCommit(false);
config.addDataSourceProperty("cachePrepStmts", true);
config.addDataSourceProperty("prepStmtCacheSize", 250);
config.addDataSourceProperty("prepStmtCacheSqlLimit", 2048);
datasource = new HikariDataSource(config);
The application stuck at the line:
datasource = new HikariDataSource(config);
Got this log while I'm using "com.mysql.jdbc.Driver":
thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting...
thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Start completed.
But after switching to mariadb connector, this is the last line I see:
thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting...
Note: I've tested with multiple mysql servers as well as an Aurora one. Regardless of which one is used as jdbc URL, HikariDataSource fails starting as long as I use mariadb driver.
Temporary Solution:
I've done testing by downgrading mariadb driver to version 1.5.4 and this solved the connection hanging problem.
With more testing I found out the latest version that can work well with Aurora is 1.5.9
After going through the change log for 1.6.0 / 2.0.0-RC, I found out the culprit: usePipelineAuth is default to true.
- Either downgrade to version 1.5.9 or below
- Or continue using 1.6.0 / 2.0.0 / 2.0.1 and mark usePipelineAuth=false in the jdbc url.
Attachments
Issue Links
- relates to
-
CONJ-474 Aurora sqltransientconnectionexception when using 1.6.0
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
*Environment*:
HikariCP version: 2.6.1 JDK version : 1.8.0_125 Database : MySQL Driver :org.mariadb.jdbc.Driver Driver version : 2.0.1 *Issue*: Running into a weird issue while using HikariCP with mariadb connector. HikariCP pool stuck at start up sequence after I changed com.mysql.jdbc.Driver to org.mariadb.jdbc.Driver *Usage*: String driver = "org.mariadb.jdbc.Driver"; String jdbcUrl = "jdbc:mysql://mysql_host:3306"; Class.forName(driver); HikariConfig config = new HikariConfig(); config.setDriverClassName(driver); config.setJdbcUrl(jdbcUrl); config.setUsername(user); config.setPassword(password); config.setConnectionTimeout(30000); config.setMaximumPoolSize(20); config.setAutoCommit(false); config.addDataSourceProperty("cachePrepStmts", true); config.addDataSourceProperty("prepStmtCacheSize", 250); config.addDataSourceProperty("prepStmtCacheSqlLimit", 2048); datasource = new HikariDataSource(config); The application stuck at the line: datasource = new HikariDataSource(config); Got this log while I'm using "com.mysql.jdbc.Driver": thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Start completed. But after switching to mariadb connector, this is the last line I see: thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... Note: I've tested with multiple mysql servers as well as an Aurora one. Regardless of which one is used as jdbc URL, HikariDataSource fails starting as long as I use mariadb driver. Can someone help me explain this weird behaviro? |
*Environment*:
HikariCP version: 2.6.1 JDK version : 1.8.0_125 Database : MySQL Driver :org.mariadb.jdbc.Driver Driver version : 2.0.1 *Issue*: Running into a weird issue while using HikariCP with mariadb connector. HikariCP pool stuck at start up sequence after I changed com.mysql.jdbc.Driver to org.mariadb.jdbc.Driver *Usage*: String driver = "org.mariadb.jdbc.Driver"; String jdbcUrl = "jdbc:mysql://mysql_host:3306"; Class.forName(driver); HikariConfig config = new HikariConfig(); config.setDriverClassName(driver); config.setJdbcUrl(jdbcUrl); config.setUsername(user); config.setPassword(password); config.setConnectionTimeout(30000); config.setMaximumPoolSize(20); config.setAutoCommit(false); config.addDataSourceProperty("cachePrepStmts", true); config.addDataSourceProperty("prepStmtCacheSize", 250); config.addDataSourceProperty("prepStmtCacheSqlLimit", 2048); datasource = new HikariDataSource(config); The application stuck at the line: datasource = new HikariDataSource(config); Got this log while I'm using "com.mysql.jdbc.Driver": thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Start completed. But after switching to mariadb connector, this is the last line I see: thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... Note: I've tested with multiple mysql servers as well as an Aurora one. Regardless of which one is used as jdbc URL, HikariDataSource fails starting as long as I use mariadb driver. |
Description |
*Environment*:
HikariCP version: 2.6.1 JDK version : 1.8.0_125 Database : MySQL Driver :org.mariadb.jdbc.Driver Driver version : 2.0.1 *Issue*: Running into a weird issue while using HikariCP with mariadb connector. HikariCP pool stuck at start up sequence after I changed com.mysql.jdbc.Driver to org.mariadb.jdbc.Driver *Usage*: String driver = "org.mariadb.jdbc.Driver"; String jdbcUrl = "jdbc:mysql://mysql_host:3306"; Class.forName(driver); HikariConfig config = new HikariConfig(); config.setDriverClassName(driver); config.setJdbcUrl(jdbcUrl); config.setUsername(user); config.setPassword(password); config.setConnectionTimeout(30000); config.setMaximumPoolSize(20); config.setAutoCommit(false); config.addDataSourceProperty("cachePrepStmts", true); config.addDataSourceProperty("prepStmtCacheSize", 250); config.addDataSourceProperty("prepStmtCacheSqlLimit", 2048); datasource = new HikariDataSource(config); The application stuck at the line: datasource = new HikariDataSource(config); Got this log while I'm using "com.mysql.jdbc.Driver": thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Start completed. But after switching to mariadb connector, this is the last line I see: thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... Note: I've tested with multiple mysql servers as well as an Aurora one. Regardless of which one is used as jdbc URL, HikariDataSource fails starting as long as I use mariadb driver. |
*Environment*:
HikariCP version: 2.6.1 JDK version : 1.8.0_125 Database : MySQL Driver :org.mariadb.jdbc.Driver Driver version : 2.0.1 *Issue*: Running into a weird issue while using HikariCP with mariadb connector. HikariCP pool stuck at start up sequence after I changed com.mysql.jdbc.Driver to org.mariadb.jdbc.Driver *Usage*: String driver = "org.mariadb.jdbc.Driver"; String jdbcUrl = "jdbc:mysql://mysql_host:3306"; Class.forName(driver); HikariConfig config = new HikariConfig(); config.setDriverClassName(driver); config.setJdbcUrl(jdbcUrl); config.setUsername(user); config.setPassword(password); config.setConnectionTimeout(30000); config.setMaximumPoolSize(20); config.setAutoCommit(false); config.addDataSourceProperty("cachePrepStmts", true); config.addDataSourceProperty("prepStmtCacheSize", 250); config.addDataSourceProperty("prepStmtCacheSqlLimit", 2048); datasource = new HikariDataSource(config); The application stuck at the line: datasource = new HikariDataSource(config); Got this log while I'm using "com.mysql.jdbc.Driver": thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Start completed. But after switching to mariadb connector, this is the last line I see: thread="main" log="INFO" class="c.z.h.HikariDataSource" HikariPool-5 - Starting... Note: I've tested with multiple mysql servers as well as an Aurora one. Regardless of which one is used as jdbc URL, HikariDataSource fails starting as long as I use mariadb driver. *Temporary Solution*: I've done testing by downgrading mariadb driver to version 1.5.4 and this solved the connection hanging problem. With more testing I found out the latest version that can work well with Aurora is 1.5.9 After going through the change log for 1.6.0 / 2.0.0-RC, I found out the culprit: usePipelineAuth is default to true. - Either downgrade to version 1.5.9 or below - Or continue using 1.6.0 / 2.0.0 / 2.0.1 and mark usePipelineAuth=false in the jdbc url. |
Affects Version/s | 1.6.0 [ 22529 ] | |
Affects Version/s | 2.0.0-RC [ 22119 ] |
Summary | MariaDB Connector Failed HikariCP Starting Sequence | Aurora not compatible with |
Summary | Aurora not compatible with | Aurora not compatible with option usePipelineAuth |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 1.6.1 [ 22550 ] | |
Fix Version/s | 2.0.2 [ 22551 ] |
Component/s | aurora [ 14008 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 80886 ] | MariaDB v4 [ 134983 ] |
Hi MariaDB JDBC driver developer(s)
It seems the "usePipelineAuth" introduced in 2.0.0 is incompatible with AWS Aurora cluster / instances.
Can you please get this addresses? I'd like to continue using the latest version of your awesome driver.
If you need more details for debugging this issue, please let me know and I'd be happy to help providing more details.