Error occurred while trying to connect to the database: the server selected protocol version tls10 is not accepted by client preferences tls12

Error occurred while trying to connect to the database: the server selected protocol version tls10 is not accepted by client preferences tls12

AE Version: 6.0

Java Version: OpenJDK 11


Error:



Solution:

OpenJDK will be disabling TLS 1.0 and 1.1 availability by default in java.security file. Java applications using TLS to communicate will need to use TLS 1.2 or above to establish a connection.

- To re-enable the TLS 1.0 and 1.1 in OpenJDK, do the following steps:

- Edit java.security file from OpenJDK/conf/Security folder

Option 1 (preferred): First, ensure security.overridePropertiesFile value in the java.security file is set to true (this is usually the default value).

Then, take the following steps:
  • Create a file named enableLegacyTLS.security
  • In that file, add an entry for jdk.tls.disabledAlgorithms with the same contents as the jdk.tls.disabledAlgorithms property in java.security file.
  • Remove TLSv1.0 and/or TLSv1.1 from the list on the enableLegacyTLS.security.
  • Start your application with -Djava.security.properties=path/to/enableLegacyTLS.security

Option 2: You can edit this value in java.security file directly. Search for the property jdk.tls.disabledAlgorithms. For OpenJDK 11, its contents will be similar to:

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

By removing the TLSv1.1 and/or TLSv1 entries, you can re-establish those versions back to the list of usable versions within the JDK.


      Links to better reach 

            Bot Store

             EPD