Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

Tags:

datagrip

I upgraded DataGrip to 2021.1.2, and now when I run any query I get this response

javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

How to resolve this?

like image 515
Ali Faris Avatar asked Jun 04 '21 16:06

Ali Faris


2 Answers

you need to do the following:

1: create a new file (any where) with the name custom.java.security

2: put the following content in the file

jdk.tls.disabledAlgorithms=SSLv3, TLSv1.1, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
    include jdk.disabled.namedCurves

3 : open DataGrip -> in your database panel -> select the database you want -> right click -> select Properties -> go to the Advanced tab

4 : in the VM Options field write the following

-Djava.security.properties=${PATH_TO_FILE}/custom.java.security

you need to replace ${PATH_TO_FILE} with the folder path of the file that you created in step 1

don't forget to have \\ instead of one \ in path if you use windows

5 : goto File menu -> select Invalidate Caches... -> click Invalidate And Restart


enter image description here


Credit : https://youtrack.jetbrains.com/issue/DBE-13313

like image 180
Ali Faris Avatar answered Sep 28 '22 00:09

Ali Faris


if you are trying to connect Microsoft Sql server the use the drive

Microsoft SQL Server (jTds)

note : Click on the driver option enter image description here

enter image description here

like image 23
Hoque MD Zahidul Avatar answered Sep 27 '22 23:09

Hoque MD Zahidul