Kafka PubSub连接器:码头ALPN/NPN尚未正确配置



我正在使用kafka_2.11-0.10.2.1和Google提供的PubSub连接器。我要做的就是使用独立连接器将数据从Kafka主题推到PubSub One。我遵循了所有的步骤:

  1. 生产cps-kafka-connector.jar
  2. 在Kafka的config目录中添加了cps-sink-connector.properties文件。该文件看起来像这样:
name=CPSConnector
connector.class=com.google.pubsub.kafka.sink.CloudPubSubSinkConnector
tasks.max=10
topics=kafka_topic
cps.topic=pubsub_topic
cps.project=my_gcp_project_12345
  1. 我确保我在connect-standalone.properties中启用string转换器,因为我的目的是仅发送字符串消息:
key.converter=org.apache.kafka.connect.storage.StringConverter 
value.converter=org.apache.kafka.connect.storage.StringConverter
  1. 我创建了一个主题kafka_topic,并发送了一些消息,如下所示:
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic kafka_topic
$ hello streams
$ kafka streams rock
  1. 我运行了连接器如下:
$ bin/connect-standalone.sh config/connect-standalone.properties config/cps-sink-connector.properties

的意图是运行:

$ gcloud beta pubsub subscriptions pull subscription_to_pubsub_topic

收集这些消息。但是,下面的错误进一步发生了,我无法围绕它们。

它们似乎与jetty-9.2.15.v20160210相关联。注意:

  [2017-05-04 22:42:26,635] ERROR Commit of WorkerSinkTask{id=CPSConnector-0} offsets threw an unexpected exception:(org.apache.kafka.connect.runtime.WorkerSinkTask:204)
  java.lang.RuntimeException: java.util.concurrent.ExecutionException:       io.grpc.StatusRuntimeException: UNKNOWN

  Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNKNOWN ...
  Caused by: io.grpc.StatusRuntimeException: UNKNOWN ...
  Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured ...

有什么想法吗?如何配置码头?我在这里读了一篇文章,其中指出:

今天没有标准的Java发布对ALPN的内置支持(有 跟踪问题,所以请进行投票!(,所以我们需要使用Jetty-Alpn (如果在Java< 8上(OpenJDK的BootClassPath扩展程序。到 执行此操作,添加一个XbootClassPath JVM选项参考路径 JETTY ALPN-boot Jar。

java -Xbootclasspath/p:/path/to/jetty/alpn/extension.jar ...

请注意,您必须使用特定于Jetty-Alpn Jar的释放 您正在使用的Java版本。但是,您可以使用JVM代理 jeety-alpn代理加载正确的码头alpn-boot jar文件 当前Java版本。为此,而不是添加XbootClassPath 选项,添加Javaagent JVM选项参考码头的路径 alpn代理罐。

java -javaagent:/path/to/jetty-alpn-agent.jar ...

...但是我真的没有如何在配置中考虑这一点。有什么想法吗?错误日志的一部分显示在下面:

    ...
    name = CPSConnector
    tasks.max = 10
    transforms = null
    value.converter = null
   (org.apache.kafka.connect.runtime.ConnectorConfig:180)
  [2017-05-04 22:42:17,447] INFO TaskConfig values:
    task.class = class com.google.pubsub.kafka.sink.CloudPubSubSinkTask
   (org.apache.kafka.connect.runtime.TaskConfig:180)
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@6fda6170] Created with target pubsub.googleapis.com:443
  [2017-05-04 22:42:17,447] INFO Instantiated task CPSConnector-7 with version 0.10.2.1 of type com.google.pubsub.kafka.sink.CloudPubSubSinkTask (org.apache.kafka.connect.runtime.Worker:317)
  [2017-05-04 22:42:17,451] INFO ConsumerConfig values:
    auto.commit.interval.ms = 5000
    auto.offset.reset = earliest
    bootstrap.servers = [localhost:9092]
    check.crcs = true
    client.id =
    connections.max.idle.ms = 540000
    enable.auto.commit = false
    exclude.internal.topics = true
    fetch.max.bytes = 52428800
    fetch.max.wait.ms = 500
    fetch.min.bytes = 1
    group.id = connect-CPSConnector
    heartbeat.interval.ms = 3000
    interceptor.classes = null
    key.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer
    max.partition.fetch.bytes = 1048576
    max.poll.interval.ms = 300000
    max.poll.records = 500
    metadata.max.age.ms = 300000
    metric.reporters = []
    metrics.num.samples = 2
    metrics.recording.level = INFO
    metrics.sample.window.ms = 30000
    partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor]
    receive.buffer.bytes = 65536
    reconnect.backoff.ms = 50
    request.timeout.ms = 305000
    retry.backoff.ms = 100
    sasl.jaas.config = null
    sasl.kerberos.kinit.cmd = /usr/bin/kinit
    sasl.kerberos.min.time.before.relogin = 60000
    sasl.kerberos.service.name = null
    sasl.kerberos.ticket.renew.jitter = 0.05
    sasl.kerberos.ticket.renew.window.factor = 0.8
    sasl.mechanism = GSSAPI
    security.protocol = PLAINTEXT
    send.buffer.bytes = 131072
    session.timeout.ms = 10000
    ssl.cipher.suites = null
    ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
    ssl.endpoint.identification.algorithm = null
    ssl.key.password = null
    ssl.keymanager.algorithm = SunX509
    ssl.keystore.location = null
    ssl.keystore.password = null
    ssl.keystore.type = JKS
    ssl.protocol = TLS
    ssl.provider = null
    ssl.secure.random.implementation = null
    ssl.trustmanager.algorithm = PKIX
    ssl.truststore.location = null
    ssl.truststore.password = null
    ssl.truststore.type = JKS
    value.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer
   (org.apache.kafka.clients.consumer.ConsumerConfig:180)
  [2017-05-04 22:42:17,461] INFO Kafka version : 0.10.2.1 (org.apache.kafka.common.utils.AppInfoParser:83)
  [2017-05-04 22:42:17,461] INFO Kafka commitId : e89bffd6b2eff799 (org.apache.kafka.common.utils.AppInfoParser:84)
  [2017-05-04 22:42:17,462] INFO Creating task CPSConnector-8 (org.apache.kafka.connect.runtime.Worker:305)
  [2017-05-04 22:42:17,463] INFO ConnectorConfig values:
    connector.class = com.google.pubsub.kafka.sink.CloudPubSubSinkConnector
    key.converter = null
    name = CPSConnector
    tasks.max = 10
    transforms = null
    value.converter = null
   (org.apache.kafka.connect.runtime.ConnectorConfig:180)
  [2017-05-04 22:42:17,463] INFO TaskConfig values:
    task.class = class com.google.pubsub.kafka.sink.CloudPubSubSinkTask
   (org.apache.kafka.connect.runtime.TaskConfig:180)
  [2017-05-04 22:42:17,463] INFO Instantiated task CPSConnector-8 with version 0.10.2.1 of type com.google.pubsub.kafka.sink.CloudPubSubSinkTask (org.apache.kafka.connect.runtime.Worker:317)
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@74e87b55] Created with target pubsub.googleapis.com:443
  [2017-05-04 22:42:17,465] INFO ConsumerConfig values:
    auto.commit.interval.ms = 5000
    auto.offset.reset = earliest
    bootstrap.servers = [localhost:9092]
    check.crcs = true
    client.id =
    connections.max.idle.ms = 540000
    enable.auto.commit = false
    exclude.internal.topics = true
    fetch.max.bytes = 52428800
    fetch.max.wait.ms = 500
    fetch.min.bytes = 1
    group.id = connect-CPSConnector
    heartbeat.interval.ms = 3000
    interceptor.classes = null
    key.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer
    max.partition.fetch.bytes = 1048576
    max.poll.interval.ms = 300000
    max.poll.records = 500
    metadata.max.age.ms = 300000
    metric.reporters = []
    metrics.num.samples = 2
    metrics.recording.level = INFO
    metrics.sample.window.ms = 30000
    partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor]
    receive.buffer.bytes = 65536
    reconnect.backoff.ms = 50
    request.timeout.ms = 305000
    retry.backoff.ms = 100
    sasl.jaas.config = null
    sasl.kerberos.kinit.cmd = /usr/bin/kinit
    sasl.kerberos.min.time.before.relogin = 60000
    sasl.kerberos.service.name = null
    sasl.kerberos.ticket.renew.jitter = 0.05
    sasl.kerberos.ticket.renew.window.factor = 0.8
    sasl.mechanism = GSSAPI
    security.protocol = PLAINTEXT
    send.buffer.bytes = 131072
    session.timeout.ms = 10000
    ssl.cipher.suites = null
    ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
    ssl.endpoint.identification.algorithm = null
    ssl.key.password = null
    ssl.keymanager.algorithm = SunX509
    ssl.keystore.location = null
    ssl.keystore.password = null
    ssl.keystore.type = JKS
    ssl.protocol = TLS
    ssl.provider = null
    ssl.secure.random.implementation = null
    ssl.trustmanager.algorithm = PKIX
    ssl.truststore.location = null
    ssl.truststore.password = null
    ssl.truststore.type = JKS
    value.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer
   (org.apache.kafka.clients.consumer.ConsumerConfig:180)
  [2017-05-04 22:42:17,469] INFO Kafka version : 0.10.2.1 (org.apache.kafka.common.utils.AppInfoParser:83)
  [2017-05-04 22:42:17,472] INFO Kafka commitId : e89bffd6b2eff799 (org.apache.kafka.common.utils.AppInfoParser:84)
  [2017-05-04 22:42:17,478] INFO Creating task CPSConnector-9 (org.apache.kafka.connect.runtime.Worker:305)
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@15768b04] Created with target pubsub.googleapis.com:443
  [2017-05-04 22:42:17,484] INFO ConnectorConfig values:
    connector.class = com.google.pubsub.kafka.sink.CloudPubSubSinkConnector
    key.converter = null
    name = CPSConnector
    tasks.max = 10
    transforms = null
    value.converter = null
   (org.apache.kafka.connect.runtime.ConnectorConfig:180)
  [2017-05-04 22:42:17,486] INFO TaskConfig values:
    task.class = class com.google.pubsub.kafka.sink.CloudPubSubSinkTask
   (org.apache.kafka.connect.runtime.TaskConfig:180)
  [2017-05-04 22:42:17,486] INFO Instantiated task CPSConnector-9 with version 0.10.2.1 of type com.google.pubsub.kafka.sink.CloudPubSubSinkTask (org.apache.kafka.connect.runtime.Worker:317)
  [2017-05-04 22:42:17,486] INFO ConsumerConfig values:
    auto.commit.interval.ms = 5000
    auto.offset.reset = earliest
    bootstrap.servers = [localhost:9092]
    check.crcs = true
    client.id =
    connections.max.idle.ms = 540000
    enable.auto.commit = false
    exclude.internal.topics = true
    fetch.max.bytes = 52428800
    fetch.max.wait.ms = 500
    fetch.min.bytes = 1
    group.id = connect-CPSConnector
    heartbeat.interval.ms = 3000
    interceptor.classes = null
    key.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer
    max.partition.fetch.bytes = 1048576
    max.poll.interval.ms = 300000
    max.poll.records = 500
    metadata.max.age.ms = 300000
    metric.reporters = []
    metrics.num.samples = 2
    metrics.recording.level = INFO
    metrics.sample.window.ms = 30000
    partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor]
    receive.buffer.bytes = 65536
    reconnect.backoff.ms = 50
    request.timeout.ms = 305000
    retry.backoff.ms = 100
    sasl.jaas.config = null
    sasl.kerberos.kinit.cmd = /usr/bin/kinit
    sasl.kerberos.min.time.before.relogin = 60000
    sasl.kerberos.service.name = null
    sasl.kerberos.ticket.renew.jitter = 0.05
    sasl.kerberos.ticket.renew.window.factor = 0.8
    sasl.mechanism = GSSAPI
    security.protocol = PLAINTEXT
    send.buffer.bytes = 131072
    session.timeout.ms = 10000
    ssl.cipher.suites = null
    ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
    ssl.endpoint.identification.algorithm = null
    ssl.key.password = null
    ssl.keymanager.algorithm = SunX509
    ssl.keystore.location = null
    ssl.keystore.password = null
    ssl.keystore.type = JKS
    ssl.protocol = TLS
    ssl.provider = null
    ssl.secure.random.implementation = null
    ssl.trustmanager.algorithm = PKIX
    ssl.truststore.location = null
    ssl.truststore.password = null
    ssl.truststore.type = JKS
    value.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer
   (org.apache.kafka.clients.consumer.ConsumerConfig:180)
  [2017-05-04 22:42:17,492] INFO Kafka version : 0.10.2.1 (org.apache.kafka.common.utils.AppInfoParser:83)
  [2017-05-04 22:42:17,493] INFO Kafka commitId : e89bffd6b2eff799 (org.apache.kafka.common.utils.AppInfoParser:84)
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@2aa0b78d] Created with target pubsub.googleapis.com:443
  [2017-05-04 22:42:17,496] INFO Created connector CPSConnector (org.apache.kafka.connect.cli.ConnectStandalone:90)
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@1bb167da] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@41380fb7] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@7ecb1a4d] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@4db17054] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3ca410f4] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@611d92fb] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@7a2f9bb8] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@24675ca9] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@7e101025] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@65220a00] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@79a69904] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@4dcf0b0d] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@6440f37f] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@179dd4b2] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@67a3fdd] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@5a8c6de1] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@7b83e31f] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3408c640] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@6b9cd402] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3790445] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@2a583bab] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@68d47f55] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3b0906db] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@4ef86c1f] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@793abbe9] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@2c734def] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@202098c0] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3b129183] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@2058dcfd] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@c977767] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@1c4dbc55] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@48952135] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@31b59feb] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@21c700c] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@35a9958a] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@5611534b] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@5b844502] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3af9d26e] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3d18fe46] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@6910904f] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@3aa392ae] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@5f8e90f5] Created with target pubsub.googleapis.com:443
  May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init>
  INFO: [ManagedChannelImpl@5e5c05fe] Created with target pubsub.googleapis.com:443
  ...
  Caused by: io.grpc.StatusRuntimeException: UNKNOWN
    at io.grpc.Status.asRuntimeException(Status.java:545)
    at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:417)
    at io.grpc.ClientInterceptors$CheckedForwardingClientCall.start(ClientInterceptors.java:203)
    at io.grpc.stub.ClientCalls.startCall(ClientCalls.java:248)
    at io.grpc.stub.ClientCalls.asyncUnaryRequestCall(ClientCalls.java:227)
    at io.grpc.stub.ClientCalls.futureUnaryCall(ClientCalls.java:186)
    at com.google.pubsub.v1.PublisherGrpc$PublisherFutureStub.publish(PublisherGrpc.java:480)
    at com.google.pubsub.kafka.sink.CloudPubSubGRPCPublisher.publish(CloudPubSubGRPCPublisher.java:44)
    at com.google.pubsub.kafka.sink.CloudPubSubRoundRobinPublisher.publish(CloudPubSubRoundRobinPublisher.java:43)
    at com.google.pubsub.kafka.sink.CloudPubSubSinkTask.publishMessagesForPartition(CloudPubSubSinkTask.java:321)
    at com.google.pubsub.kafka.sink.CloudPubSubSinkTask.flush(CloudPubSubSinkTask.java:265)
    ... 22 more
  Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.
    at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:153)
    at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:130)
    at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:119)
    at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:90)
    at io.grpc.netty.NettyChannelBuilder.createProtocolNegotiator(NettyChannelBuilder.java:263)
    at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(NettyChannelBuilder.java:322)
    at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:62)
    at io.grpc.internal.TransportSet.startNewTransport(TransportSet.java:199)
    at io.grpc.internal.TransportSet.obtainActiveTransport(TransportSet.java:179)
    at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:476)
    at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:432)
    at io.grpc.DummyLoadBalancerFactory$DummyLoadBalancer.pickTransport(DummyLoadBalancerFactory.java:105)
    at io.grpc.internal.ManagedChannelImpl$1.get(ManagedChannelImpl.java:149)
    at io.grpc.internal.ClientCallImpl.start(ClientCallImpl.java:201)
    at io.grpc.auth.ClientAuthInterceptor$1.checkedStart(ClientAuthInterceptor.java:104)
    at io.grpc.ClientInterceptors$CheckedForwardingClientCall.start(ClientInterceptors.java:195)
    ... 30 more

问题与文件中的 pom.xml有关(此处:https://github.com/googleclecleclecloudplatform/pubsub/pubsub/blob/blob/master/kafka-connector/pom.xml(默认设置可用于linux-x86_64。我用${os.detected.classifier}替换linux-x86_64,一切正常。具体来说,我替换了:

<dependency>
 <groupId>io.netty</groupId>
 <artifactId>netty-tcnative-boringssl-static</artifactId>
 <version>1.1.33.Fork14</version>
 <classifier>linux-x86_64</classifier>

with:

<dependency>
 <groupId>io.netty</groupId>
 <artifactId>netty-tcnative-boringssl-static</artifactId>
 <version>1.1.33.Fork14</version>
 <classifier>${os.detected.classifier}/classifier>

GoogleCloudPlatform/pubsub/kafka-connector/pom.xml中。

相关内容

  • 没有找到相关文章

最新更新