Error message "The server selected protocol version TLS10 is not accepted by client preferences"
Asked Answered
W

12

50

I am trying to run this JNLP file on Windows 10 to connect to a server (actually, I am connecting to a dedicated server via KVM over IPMI (IPKVM) or whatever it is called, so I can install a new operating system).

I am getting error

The server selected protocol version TLS10 is not accepted by client preferences.

Is there something I need to do in Java client to fix the error?

Enter image description here

Enter image description here

Enter image description here

Weatherbeaten answered 24/4, 2021 at 18:12 Comment(1)
Unrelenting tls10 objections in my case. So I grabbed jre7 which worked making sure its bin directory had priority. Was necessary to create an Oracle account to access the archivesProvenance
C
85

Go to folder C:\Program Files (x86)\Java\jre1.8.0_291\lib\security.

In file java.security, find option jdk.tls.disabledAlgorithms and delete TLSv1.

Couching answered 27/6, 2021 at 9:43 Comment(8)
For Linux environment the file is in /usr/lib/jvm/java-11-openjdk-amd64/conf/security/java.securityHuehuebner
For Java 64 bits the PATH is "C:\Program Files\Java\jre...\lib\secutiry\java.security"Freewheel
@EytanNaim It's not only for Linux enviroment but for java-11 plus version!Protohistory
Probably better @EytanNaim to do locate conf/security/java.security -- you might not be on that version of java.Geometrician
It's worth noting that one shouldn't be randomly disabling security features: TLSv1 and all the other items in jdk.tls.disabledAlgorithms are disabled because they're insecure. In my case, it's a very old SQL Server db that will, I hope, be replaced next month.Geometrician
Can't edit it due to non-administrative rightsPenelope
The problem ocurred also with JDK 8.0.382-zulu. The fix is also the same and the path (MacOs Ventura) is .../8.0.382-zulu/zulu-8.jdk/Contents/Home/jre/lib/securityMckeon
I actually had to ultimately change it here as well: C:\Program Files\Java\jdk1.8.0_333\jre\lib\securityViyella
F
18

It appears that the latest update of Java 11 has disabled TLS 1.0 and TLS 1.1.

Here is the detailed documentation on how to enable it again: TLS 1.0/1.1 changes in OpenJDK and Amazon Corretto

Apparently, I was caught in this issue because of a JDK update today and had hard time finding it. This can help.

Fettle answered 28/4, 2021 at 12:33 Comment(0)
S
12

The first thing to do: Go to folder C:\Program Files\Java\jre1.8.0_291\lib\security. In the java.security file, find option jdk.tls.disabledAlgorithms and delete TLSv1.

If it still doesn't work, make sure that the line:

deployment.security.TLSv1=true

exists in file C:\Users\JavaUser\AppData\LocalLow\Sun\Java\Deployment\deployment.properties.

Stringent answered 26/4, 2022 at 8:19 Comment(6)
On Windows, presumably. What version was it tested on? Windows 10?Timelag
Under Linux you may find "jdk.tls.disabledAlgorithms" under "~/.config/icedtea-web/deployment.properties" and "deployment.security.TLSv1=true" is configured in "/etc/java-*-openjdk/security/java.security"Biconvex
Thank you!! the second part of your answer ended up working for me.Poundfoolish
works for me, only with first part, thanksTripodic
I actually had to ultimately change it here as well: C:\Program Files\Java\jdk1.8.0_333\jre\lib\securityViyella
Unfortunately none of the options worked for me, are there any other alternatives to this?Posture
K
6

Don't update to Java 11. Nowadays TLS 1.0 is outdated. The sites using TLS 1.0 and TLS 1.1 certificates for encryption will be marked as insecure in browsers.

So better to update the Transport Layer Security (TLS) version in SQL Server.

Please follow the pages:

Karyoplasm answered 2/6, 2021 at 11:57 Comment(0)
U
4

You can set it in JRE inside SoapUI (if you are using it): Remove "TLSv1, TLSv1.1" from "jdk.tls.disabledAlgorithms" property in file ${soapui_home}/jre/conf/securityjava.security.

Unofficial answered 9/2, 2022 at 13:1 Comment(2)
Removing from jdk.tls.disabledAlgorithms did worked for me.Dymphia
Then you should restart SoapUI.Benfield
H
2

I know this is a Windows 10 related question, but just in case somebody is looking for an answer. I found this helpful hint here.

For RedHat based JVMs (e.g. Docker image registry.redhat.io/ubi8/openjdk-11-runtime) you have to remove TLSv1 from the property jdk.tls.disabledAlgorithms in:

/etc/crypto-policies/back-ends/java.config

as modifying the java.security file alone, will not solve the issue.

Hendel answered 12/10, 2022 at 10:24 Comment(1)
I worked on this for hours before coming across this. Thank you.Flick
W
1

Go to Control Panel, Program. Click on Java (Java control Panel), go to Advanced, scroll down and check TLS 1.0 and TLS 1.1.

Close your program and start it again.

Wellknown answered 20/10, 2021 at 1:12 Comment(1)
What platform? Windows? What version? Windows 10?Timelag
D
0

If you are using eclipse first check the path of jre used by eclipse. For knowing the path of JRE used by eclipse you can follow the below steps. (project>properties>java build path> libraries).
click on JRE system library>edit>installed JREs
Now it will display the path of JRE currently used by eclipse.
Go to JRE>conf>security and open java.security file and remove TLSv1 from the property jdk.tls.disabledAlgorithms

Deconsecrate answered 23/1, 2023 at 7:8 Comment(0)
C
0

the solution look the video for java 11

The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

https://www.youtube.com/watch?v=ynEQM-W8RkU

Collide answered 29/6, 2023 at 16:20 Comment(0)
V
0

I had this issue recently, it was because I was trying to connect to an old version of Microsoft SQL Server (2012, ver. 11.00.3156) using the latest versión of the SQL Server JDBC Driver (ver. 12.2.0) with a newer versión JDK (ver. 11.0.15).

It happens because newer versión of JDK by default dissable some old security algorithms like TLSv1.0 (in favor of newer like TLSv1.2/TLSv1.3) which the old SQL Server is requiring as security algorithm.

To solve the issue I changed the JDBC driver to an older version 8.2.2 and I had to pass some java security VM options to the JDK to override some security configs and remove TLSV1.0 from the disabled algorithms

VM options to pass to JDK

-Djdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL

(note that TLSv1.0 and TLSv1.1 are removed from the original JDK list)

enter image description here

Doing that I managed to successfully connect to the old SQL Server 2012. Hope this help you

Vaginitis answered 28/7, 2023 at 15:13 Comment(0)
I
0

On Linux but, Java being cross platform, I believe the main options I used still apply. I had the same errors as OP and an additional one about a self-signed jar. To use the tool to connect and install/manage the OS:

  1. I first downloaded an old JDK and saved it in its own location (/usr/local/lib/jvm/jre1.8.0_x/), without adding it to $PATH. I didn't want the outadted version to be used by default for anything.
  2. I ran /usr/local/lib/jvm/jre1.8.0_x/bin/javaws -viewer, then escaped out of the cache viewer dialogue, to add the servers to the Exception Site List under the Security tab, e.g. https://10.24.12.6/. This causes Java to show a warning dialogue rather than blocking the load entirely.
  3. I then ran the following command to execute the downloaded .jnlp. The environment variable is set inline so it's used only for that one run rather than using a global setting or affecting the entire shell. In Windows, you probably have to set that environment variable separately, which will affect all subsequent invocations of java, javaws, etc. in that running shell, but the values should be the same.
    _JAVA_OPTIONS='-Djdk.tls.client.protocols=TLSv1 -Dhttps.protocols=TLSv1 -Djdk.tls.disabledAlgorithms=None -Djdk.jar.disabledAlgorithms=None' /usr/local/lib/jvm/jre1.8.0_x/bin/javaws my-connection-file.jnlp
    

Though I'd allowed TLSv1 in the security settings, the client was still refusing to use it, so connections continued to fail. The protocols directives force the client to use the necessary one.

Note the x in the paths is the actual version number.

Intoxication answered 8/9, 2023 at 9:1 Comment(0)
R
-3

Problem: TLS 1.0 is not supported in Java 1.8 and above. To connect to SQL Server 2014 and below servers, you need to send TLS 1.0 connection.

Solution: if you downgrade your project to Java 1.7 version this problem will be solved. The JDBC driver version you are using should be 4.2.

Solution for Java 1.7 SSL connection issue:

You will get an error when you query websites with SSL certificate in Java 1.7 version. To fix this error; Download the site’s .cer certificate. Next (note we are talking about JRE file here), write “keytool” in the carsets file at %path_java_jre\lib\security. Your connection problem will disappear.

Robinson answered 6/6, 2021 at 12:43 Comment(1)
Re "carsets": Do you mean "charsets"?Timelag

© 2022 - 2024 — McMap. All rights reserved.