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?
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
The other suggestions did not work for my IntelliJ.
What did the trick for me (while connecting to a MySQL Aurora db) was picking/downloading the "MySQL for 5.1" drivers instead of the default MySQL drivers that IntelliJ selected for me.
No need to create a file as the accepted answer.
When the error prompts, just open "Data Sources and Drivers":
The original text in "VM options":
"-Djdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, include jdk.disabled.namedCurves"
So just remove TLSv1, TLSv1.1
then apply and reconnect, it will work.
Try adding TLSv1.1,TLSv1.2,TLSv1.3 to the enabledTLSProtocols setting in the Advanced tab like this: DataGrip Project Preferences
Updating the TLS Protocol on server side should be preferred though.
Find the java.security file on your computer and edit it with any text editor, for example Notepad ++
Find the text jdk.tls.disabledAlgorithms, remove the TLS 1.1 and TLS 1.2 protocols and save the file with the changes
That's works fine!
FROM openjdk:11
COPY nci-1.0-SNAPSHOT.jar /tmp
RUN echo "jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224" >> $JAVA_HOME/co>WORKDIR /tmp
ENTRYPOINT ["java", "-Djava.security.properties=disabled_tlsv1.properties", "-jar", "nci-1.0-SNAPSHOT.jar"]