【问题标题】:Connecting Schema-Registry Docker Container to AWS MSK将 Schema-Registry Docker 容器连接到 AWS MSK
【发布时间】:2019-08-22 04:13:03
【问题描述】:

我无法将架构注册表连接到 MSK。我在一个单独的实例中运行 Docker,并启用了与 MSK 服务的连接。

尝试了来自 confluent docker.io/confluentinc/cp-schema-registry:latest 的 docker 镜像。

docker run -d \
--net=host 
--name=schema-registry 
-e SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=10.95.21.38:2181 
-e SCHEMA_REGISTRY_HOST_NAME=schema-registry 
-e SCHEMA_REGISTRY_LISTENERS=
http://schema-registry:8081 
-e SCHEMA_REGISTRY_DEBUG=true 
docker.io/confluentinc/cp-schema-registry:latest

使用 SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL 连接时遇到的错误如下

[main] ERROR io.confluent.admin.utils.cli.KafkaReadyCommand - Error while running kafka-ready.
java.lang.RuntimeException: No endpoints found for security protocol [PLAINTEXT]. Endpoints found in ZK [{REPLICATION=b-1-internal.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9093, CLIENT=b-1.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9092, CLIENT_SECURE=b-1.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9094, REPLICATION_SECURE=b-1-internal.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9095}]

还尝试将 SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL 替换为 SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS

  --net=host \
  --name=schema-registry \
  -e SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=PLAINTEXT://b-2.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9092,b-3.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9092,b-1.kafkaclusternew.jbf0pp.c4.kafka.us-west-2.amazonaws.com:9092 \
  -e SCHEMA_REGISTRY_HOST_NAME=schema-registry \
  -e SCHEMA_REGISTRY_LISTENERS=http://schema-registry:8081 \
  -e SCHEMA_REGISTRY_DEBUG=true \
  docker.io/confluentinc/cp-schema-registry:latest

仍然失败并出现以下错误

ERROR Server died unexpectedly:  (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain)
java.net.SocketException: Unresolved address

请提出任何解决方法。

【问题讨论】:

    标签: docker apache-kafka schema amazon-ecs aws-msk


    【解决方案1】:

    我遇到了同样的问题,不得不使用

    SCHEMA_REGISTRY_BOOTSTRAP_SERVERS

    而不是

    SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS

    。希望有帮助。

    【讨论】:

      猜你喜欢
      • 2021-10-12
      • 1970-01-01
      • 2022-01-26
      • 2021-11-23
      • 2023-01-11
      • 1970-01-01
      • 2022-11-24
      • 2022-06-27
      • 2015-05-11
      相关资源
      最近更新 更多