[MDEV-24492] JDBC - The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption Created: 2020-12-27 Updated: 2021-01-28 Resolved: 2021-01-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.5.8 |
| Fix Version/s: | 10.5.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrey | Assignee: | Anel Husakovic |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
RedHat 8/Centos 8 |
||
| Description |
|
Good afternoon, this question probably has little to do with Connect Engine, rather more to connect via JDBC in General. However, I noticed one nuance that when I try to create a connection to MSSQL via JDBC, through the created server:
Next, when I try to view the contents of the created table, I get an error Error SQL (1296): Got error 174 'Connecting: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Server chose TLSv1' from CONNECT And this error seems to only apply to MSSQL, because the JDBC driver for Oracle and MariaDB does not have such problems Maybe someone has experience in solving this problem? |
| Comments |
| Comment by Andrey [ 2020-12-27 ] | ||||||
|
Little bit change create table command:
And now I have next error Error SQL (1105): Connecting: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS12]". ClientConnectionId:d9f83d17-9215-43c7-a3a2-a841faa05f83 rc=-2 It seems that my MS SQL server runs on the TLS 1.0 Protocol, while OpenJDK on the Mariadb server side through JDBC tries to access only the TLS1 Protocol.2 As a result, the MS SQL server rejects the client connection | ||||||
| Comment by Anel Husakovic [ 2021-01-28 ] | ||||||
|
diego dupin seems this MDEV is related to CONJ project. | ||||||
| Comment by Andrey [ 2021-01-28 ] | ||||||
|
I'm sorry, this is not a MariaDB issue, it turns out to be disabled TLS 1.0 support starting with CentOS 8 and Red Hat 8 by default.
Once again, I apologize | ||||||
| Comment by Anel Husakovic [ 2021-01-28 ] | ||||||
|
Thanks strelkov.av for raising the issue and the workaround. |