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

Receiving "No active connections found for master" while trying to connect Aurora read instance

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 2.6.0
    • None
    • aurora
    • None
    • MacOs, AmazonLinux 2

    Description

      Hi we were having trouble connecting to our read database with using the read cluster endpoint. The stacktrace is below. I have also attached the java code that I could reproduce the issue. I am suspecting that in the `AuroraListener` line 308 setUrlParserFromEndpoints method sets `hostAddresses` in the `AuroraListener` but at `AuroraProtocol` line 205 `listener.getUrlParser().getHostAddresses()` are checked not the `listener.getHostAddresses()` I will check if I can fix the issue and create a PR when I have time. A guidance on if this could be the issue or possible side effects of changing `listener.getUrlParser().getHostAddresses()` to `listener.getHostAddresses()` would be appreciated.

      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.MastersSlavesListener.checkInitialConnection(MastersSlavesListener.java:350)
      	at org.mariadb.jdbc.internal.failover.impl.MastersSlavesListener.initializeConnection(MastersSlavesListener.java:179)
      	at org.mariadb.jdbc.internal.failover.FailoverProxy.<init>(FailoverProxy.java:120)
      	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:607)
      	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:208)
      	at com.citizenme.shared.db.util.ConnectionTestJava.main(ConnectionTestJava.java:19)
      

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            haditok Hadi Tok
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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