1

Ich verwende kafka_2.11-0.10.2.1 und die Pubsub-Connector von Google here zur Verfügung gestellt. Alles, was ich tun möchte, ist, Daten von einem Kafka-Thema zu einem PubSub-Thema mit einem Standalone-Connector zu übertragen. Ich habe alle Schritte, wie ich haben sollte:Kafka PubSub Connector: Anlegesteg ALPN/NPN wurde nicht richtig konfiguriert

  1. die cps-kafka-connector.jar Produziert
  2. hinzugefügt, um die cps-sink-connector.properties Datei in Kafkas config Verzeichnis. Die Datei sieht wie folgt aus:
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. ich sicher, dass ich string Wandler in connect-standalone.properties bin damit als meine Absicht, nur Nachrichten Zeichenfolge senden:
key.converter=org.apache.kafka.connect.storage.StringConverter 
value.converter=org.apache.kafka.connect.storage.StringConverter 
  1. Ich habe ein Thema kafka_topic und schickte einige Nachrichten wie folgt:
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic kafka_topic 
$ hello streams 
$ kafka streams rock 
  1. ich den Anschluss lief wie folgt:
$ bin/connect-standalone.sh config/connect-standalone.properties config/cps-sink-connector.properties 

und die Absicht ist zum Lauf:

$ gcloud beta pubsub subscriptions pull subscription_to_pubsub_topic 

diese Nachrichten zu sammeln. Allerdings treten die Fehler weiter unten auf und ich kann mich nicht um sie kümmern.

Sie scheinen mit jetty-9.2.15.v20160210 verbunden werden. Hinweis:

[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 

und

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

Irgendwelche Gedanken? Wie konfiguriere ich Anlegesteg? Ich las einen Beitrag here der es heißt:

Keine Standard-Java-Release hat eine integrierte Unterstützung für ALPN heute (! Es ist ein Tracking-Problem gehen, um es so upvote), so müssen wir den Jetty-ALPN verwenden (oder Jetty-NPN, wenn auf Java < 8) bootclasspath-Erweiterung für OpenJDK. Fügen Sie hierzu eine Xbootclasspath-JVM-Option hinzu, die auf den Pfad zum Jetty-boot-jar verweist.

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

Beachten Sie, dass die Freigabe der Jetty-ALPN jar spezifisch die Java-Version Sie verwenden, verwenden müssen. Sie können jedoch den JVM-Agenten Jeety-ALPN-Agent verwenden, um die korrekte Jetty-alpn-Boot-JAR-Datei für die aktuelle Java-Version zu laden. Fügen Sie dazu anstelle einer Xbootclasspath- -Option eine javaagent-JVM-Option hinzu, die auf den Pfad zum Jetty alpn-agent jar verweist.

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

... aber ich nicht wirklich bekommen, wie dies in meiner Konfiguration zu berücksichtigen. Irgendwelche Gedanken? Ein Teil des Fehlerprotokolls erscheint unter:

... 
    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: [[email protected]] 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: [[email protected]] 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: [[email protected]] 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: [[email protected]] 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: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [ManagedChannelImpl[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] Created with target pubsub.googleapis.com:443 
    May 04, 2017 10:42:17 PM io.grpc.internal.ManagedChannelImpl <init> 
    INFO: [[email protected]] 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 

Antwort

2

Problem auf die pom.xml in der Datei verwendet wurde (hier: https://github.com/GoogleCloudPlatform/pubsub/blob/master/kafka-connector/pom.xml), die standardmäßig war gesetzt für linux-x86_64 zu arbeiten. Ich habe linux-x86_64 durch ${os.detected.classifier} ersetzt und alles hat gut funktioniert. Insbesondere I ersetzt:

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

mit:

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

Verwandte Themen