简体   繁体   English

Confluent Maven 存储库不适用于 OpenJDK11

[英]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.我使用 OpenJDK11 运行 Gradle 构建,尝试获取 kafka-client 和其他包,但由于与 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

JDK is OpenJDK-11. JDK 是 OpenJDK-11。

I fixed it by adding the following line in $JAVA_HOME/lib/security/java.security我通过在 $JAVA_HOME/lib/security/java.security 中添加以下行来修复它

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM