Pramod Biligiri
Pramod Biligiri

Reputation: 365

Confluent Maven repository not working with OpenJDK11

I ran a Gradle build with OpenJDK11 that tried to fetch kafka-client and other packages, but failed with handshake error related to TLS. Error looked like below:

Could not download kafka-clients-6.2.0-ccs.jar (org.apache.kafka:kafka-clients:6.2.0-ccs)

Could not get resource 'https://packages.confluent.io/maven/org/apache/kafka/kafka-clients/6.2.0-ccs/kafka-clients-6.2.0-ccs.jar'.

Could not GET 'https://packages.confluent.io/maven/org/apache/kafka/kafka-clients/6.2.0-ccs/kafka-clients-6.2.0-ccs.jar'.

The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). 

You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.3/userguide/build_environment.html#gradle_system_properties
Received fatal alert: handshake_failure

Upvotes: 0

Views: 932

Answers (1)

Pramod Biligiri
Pramod Biligiri

Reputation: 365

I fixed it by adding the following line in $JAVA_HOME/lib/security/java.security

jdk.tls.client.protocols=TLSv1,TLSv1.1,TLSv1.2

Upvotes: 3

Related Questions