Kafka PubSub Connector: Jetty ALPN/NPN has not bee

2019-09-16 07:24发布

问题:

I am using kafka_2.11-0.10.2.1 and the pubsub connector provided by google here. All I care to do is push data from a Kafka Topic to a PubSub one using a standalone connector. I followed all steps as I should have:

  1. Produced the cps-kafka-connector.jar
  2. Added the cps-sink-connector.properties file in kafka's config directory. The file looks like this:
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. I made sure I am enabling string converters in connect-standalone.properties as my intention is to only send string messages:
key.converter=org.apache.kafka.connect.storage.StringConverter 
value.converter=org.apache.kafka.connect.storage.StringConverter
  1. I created a topic kafka_topic and sent some messages as follows:
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic kafka_topic
$ hello streams
$ kafka streams rock
  1. I ran the connector as follows:
$ bin/connect-standalone.sh config/connect-standalone.properties config/cps-sink-connector.properties

and the intention is to the run:

$ gcloud beta pubsub subscriptions pull subscription_to_pubsub_topic

to collect those messages. However, the errors further below occur and I cannot get my head around them.

They seem to be associated with jetty-9.2.15.v20160210. Notice:

  [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

and

  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 ...

Any thoughts? How do I configure jetty? I read a post here which states that:

No standard Java release has built-in support for ALPN today (there is a tracking issue so go upvote it!) so we need to use the Jetty-ALPN (or Jetty-NPN if on Java < 8) bootclasspath extension for OpenJDK. To do this, add an Xbootclasspath JVM option referencing the path to the Jetty alpn-boot jar.

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

Note that you must use the release of the Jetty-ALPN jar specific to the version of Java you are using. However, you can use the JVM agent Jeety-ALPN-Agent to load the correct Jetty alpn-boot jar file for the current Java version. To do this, instead of adding an Xbootclasspath option, add a javaagent JVM option referencing the path to the Jetty alpn-agent jar.

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

...but I dont really get how to account for this in my configuration. Any thoughts? Part of the error log appears below:

    ...
    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

回答1:

Problem was related to the pom.xml in the file (here: https://github.com/GoogleCloudPlatform/pubsub/blob/master/kafka-connector/pom.xml) which was by default set to work for linux-x86_64. I replaced linux-x86_64 with ${os.detected.classifier} and everything worked just fine. Specifically, I replaced:

<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>

in GoogleCloudPlatform/pubsub/kafka-connector/pom.xml.