MySQL 8 TLS/SSL error. Wrong number version

90 Views Asked by At

I searched a lot regarding this matter but unfortunately, I could not find anything helpful. I have an application in JAVA EE deployed in Payara Glassfish server. This application connects with SSL in on-premise database. MySQL version 8. Everything was working properly until I got the below message.

Caused by: java.sql.SQLException: connecting to destination failed with TLS error: error:0A00010B:SSL routines::wrong version number 2024-03-06T08:32:52 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:446) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:239) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:188) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.MysqlDataSource.getConnection(MysqlDataSource.java:417) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.MysqlDataSource.getConnection(MysqlDataSource.java:129) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.MysqlDataSource.getConnection(MysqlDataSource.java:114) 2024-03-06T08:32:52 at com.mysql.cj.jdbc.MysqlXADataSource.getXAConnection(MysqlXADataSource.java:52) 2024-03-06T08:32:52 at com.sun.gjc.spi.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:118) 2024-03-06T08:32:52 ... 66 more 2024-03-06T08:32:52 ]]

This error appears also when I try to connect from my latest Dbeaver client. DBeaver 24.0.0 I understand that this is related to TLS version and maybe SSL ciphers, but this is not proved while I use TLSv1.3

I tried to connect also from my MySQL CLI client with version mysql Ver 8.0.36-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu)). In this case, the behavior is strange because sometimes I can connect and sometimes not. Also, I created a Java maven app with Java 11 so I could focus on the connection. I used mysql connector 8.0.33 and 8.3.0. Again sometimes I can connect and sometimes I cannot. When the connection is successful it takes a long to respond. Its important to mention that exists a MySQL router in front of the cluster.

Thank you!

As I mentioned in my message above I tried to minimize the problem and focus on the issue regarding the connection. I tried connecting from

  • Java 11 with JDBC
  • MySQL client CLI
  • DBeaver client
0

There are 0 best solutions below