Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-477

Aurora not compatible with option usePipelineAuth

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.0-RC, 1.6.0, 2.0.1
    • 1.6.1, 2.0.2
    • aurora
    • 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

          Activity

            xdu Xing Du created issue -
            xdu Xing Du made changes -
            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.
            xdu Xing Du made changes -
            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.
            xdu Xing Du made changes -
            Affects Version/s 1.6.0 [ 22529 ]
            Affects Version/s 2.0.0-RC [ 22119 ]
            xdu Xing Du added a comment -

            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.

            xdu Xing Du added a comment - 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.
            diego dupin Diego Dupin made changes -
            Summary MariaDB Connector Failed HikariCP Starting Sequence Aurora not compatible with
            diego dupin Diego Dupin made changes -
            Summary Aurora not compatible with Aurora not compatible with option usePipelineAuth
            diego dupin Diego Dupin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            diego dupin Diego Dupin made changes -
            Fix Version/s 1.6.1 [ 22550 ]
            Fix Version/s 2.0.2 [ 22551 ]
            diego dupin Diego Dupin made changes -
            diego dupin Diego Dupin added a comment -

            Aurora detection has been added to prevent use of 2 options that have inconsistent issue : useBatchMultiSend and usePipelineAuth.
            at the same time, discussion will be initiate with the aurora team so this could be solved on aurora level.

            diego dupin Diego Dupin added a comment - Aurora detection has been added to prevent use of 2 options that have inconsistent issue : useBatchMultiSend and usePipelineAuth. at the same time, discussion will be initiate with the aurora team so this could be solved on aurora level.
            diego dupin Diego Dupin made changes -
            Component/s aurora [ 14008 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 80886 ] MariaDB v4 [ 134983 ]

            People

              diego dupin Diego Dupin
              xdu Xing Du
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.