2+ hours loading mysql/Aurora source

I tested connecting to Aurora within DBVisualizer using the MariaDB Java connectors (both 1.6.2 as bundled with Dremio, and 2.2.1 (latest)), and neither worked.

So the problem appears to be the MariaDB JDBC connector.

This thread appears to indicate problems with certain versions - https://groups.google.com/forum/#!topic/hikari-cp/IH92gKroZ04

Hi @evan_b

What’s the URL for your Aurora instance? The MariaDB driver has an issue connecting to Aurora instances with some URLs.

dblink.example.net. Not a cluster, just the one instance. Let me try connecting to the IP directly…

Yes I think this is the issue @evan_b.

The MariaDB JDBC driver cannot detect that you’re connecting to an Aurora instance. It parses the hostname looking for “amazonaws.com” to determine that you’re connecting to Aurora.

Are you able to use the AWS hostname directly?

That fixed it! Thank you for all your help.

I’m going to go complain to MariaDB about this… did you find any threads that pointed to the URL structure?

I inspected the MariaDB JDBC driver source code: https://github.com/MariaDB/mariadb-connector-j/blob/4c97512c72b0cc990ce2a641073298f973f1ab86/src/main/java/org/mariadb/jdbc/HostAddress.java

Line 123 uses a regex for rds.amazonaws.com

Thanks. I realize my situation is not a common case, but this was very frustrating. May I suggest taking a small step or two to prevent this from being a problem for others in a similar scenario?
Perhaps:

  • set a shorter timeout for initial connection (say, 1-5 minutes) rather than 8 hours
  • provide the option of using the MySQL JDBC driver rather than MariaDB one
  • better capture JDBC log output / return codes

@evan_b thanks for the suggestions. We’re already tracking #3 as a high-priority improvement and will look into incorporating your feedback on the first two items.

Thanks James and Can.