Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The published doc https://mariadb.com/products/skysql/docs/clients/mariadb-connector-j-for-skysql-services/ has the code snippet where it shows:
connProperties.put("user", "db_user");
connProperties.put("password", "db_password");
connProperties.put("useSSL", true);
connProperties.put("serverSslCert", "/path/to/skysql_chain.pem");
The value for the useSSL parameter isn't in quotes. This generates a bad handshake error:
java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=henry-xpand-ssl.mdb0001358.db.skysql.net)(port=5001)(type=master) : (conn=110) Bad SSL handshake
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/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
at doc.main(doc.java:21)
Caused by: java.sql.SQLNonTransientConnectionException: (conn=110) Bad SSL handshake
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.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java:769)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:546)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1367)
... 6 more
When the value is in double-quotes, the JDBC connection works.
Attachments
Issue Links
- is duplicated by
-
CONJ-882 TLS connection parameters are ignored in properties and must be set in URL
- Closed