简体   繁体   English

Java gradle kafka-avro-serializer 和 kafka-schema-registry-client 在部署管道中下载失败

[英]Java gradle kafka-avro-serializer and kafka-schema-registry-client fails to download in the deployment pipeline

Trying to deploy our service in the cloud I am facing the issue that two transitive dependencies could not been downloaded with the error:尝试在云中部署我们的服务时,我遇到了两个传递依赖项无法下载并出现错误的问题:

Welcome to Gradle 6.7.1!
Here are the highlights of this release:
 - File system watching is ready for production use
 - Declare the version of Java your build requires
 - Java 15 support
For more details see https://docs.gradle.org/6.7.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve io.confluent:kafka-avro-serializer:5.3.2.
     Required by:
         project :
         project : > org.apache.beam:beam-runners-google-cloud-dataflow-java:2.32.0 > org.apache.beam:beam-sdks-java-io-kafka:2.32.0
      > Could not resolve io.confluent:kafka-avro-serializer:5.3.2.
         > Could not get resource 'http://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/5.3.2/kafka-avro-serializer-5.3.2.pom'.
            > Could not GET 'http://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/5.3.2/kafka-avro-serializer-5.3.2.pom'.
               > Connection reset
   > Could not resolve io.confluent:kafka-schema-registry-client:5.3.2.
     Required by:
         project :
         project : > org.apache.beam:beam-runners-google-cloud-dataflow-java:2.32.0 > org.apache.beam:beam-sdks-java-io-kafka:2.32.0
      > Could not resolve io.confluent:kafka-schema-registry-client:5.3.2.
         > Could not get resource 'http://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/5.3.2/kafka-schema-registry-client-5.3.2.pom'.
            > Could not GET 'http://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/5.3.2/kafka-schema-registry-client-5.3.2.pom'.
               > Connection reset

Most resolutions that I could find in the web and here on stackoverflow are centered around adding a new confluent.io gradle repository:我可以在 web 和 stackoverflow 中找到的大多数分辨率都集中在添加新的 confluent.io gradle 存储库:

repositories {
    mavenCentral()
    maven {
        url "http://packages.confluent.io/maven/"
    }
}

I tried both http and https.我尝试了 http 和 https。 Neither changed anything in the cloud.两者都没有改变云中的任何东西。

I tried to add the transitive dependencies direct to the project gradle.我尝试将传递依赖项直接添加到项目 gradle。 This approach was not succesful too:这种方法也没有成功:


    implementation group: 'io.confluent', name: 'kafka-avro-serializer', version: '5.3.2'
    implementation group: 'io.confluent', name: 'kafka-schema-registry-client', version: '5.3.2'

What could be the Issue?可能是什么问题? How to best approach this Problem?如何最好地解决这个问题?

The firewall in the cloud was blocking the requests.云中的防火墙阻止了请求。 For some reason they were classified not as http , but as confluent requests, which the firewall did not knew about and therefore were blocking.由于某种原因,它们没有被归类为http ,而是被归类为confluent请求,防火墙不知道,因此被阻止。 The aimed at a "confluent" app within the k8s.针对 k8s 中的“融合”应用程序。 I don't know where this app comes from, but... Enabling those requests solved the issue.我不知道这个应用程序来自哪里,但是......启用这些请求解决了这个问题。

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

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