"SchemaRegistryException: Failed to get Kafka cluster ID" 用于本地设置
"SchemaRegistryException: Failed to get Kafka cluster ID" for LOCAL setup
我从官方汇合站点下载了汇合版本 7.0.0
的 .tz(我在 MAC),并遵循 LOCAL[=33 的设置=](1 个节点)和 Kafka/ZooKeeper 启动正常,但 Schema Registry 一直失败(请注意,我支持企业 VPN)
SchemaRegistry 日志中的异常消息是:
[2021-11-04 00:34:22,492] INFO Logging initialized @1403ms to org.eclipse.jetty.util.log.Slf4jLog (org.eclipse.jetty.util.log)
[2021-11-04 00:34:22,543] INFO Initial capacity 128, increased by 64, maximum capacity 2147483647. (io.confluent.rest.ApplicationServer)
[2021-11-04 00:34:22,614] INFO Adding listener: http://0.0.0.0:8081 (io.confluent.rest.ApplicationServer)
[2021-11-04 00:35:23,007] ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication)
io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryException: Failed to get Kafka cluster ID
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.kafkaClusterId(KafkaSchemaRegistry.java:1488)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.<init>(KafkaSchemaRegistry.java:166)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.initSchemaRegistry(SchemaRegistryRestApplication.java:71)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.configureBaseApplication(SchemaRegistryRestApplication.java:90)
at io.confluent.rest.Application.configureHandler(Application.java:271)
at io.confluent.rest.ApplicationServer.doStart(ApplicationServer.java:245)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:44)
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1784)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1928)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:180)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.kafkaClusterId(KafkaSchemaRegistry.java:1486)
... 7 more
我的 schema-registry.properties
文件 bootstrap URL 设置为
kafkastore.bootstrap.servers=PLAINTEXT://localhost:9092
我看到一些帖子说它的 SchemaRegistry 无法连接到 KafkaCluster URL 因为可能是本地主机地址。我是 Kafka 的新手,基本上只需要这个本地设置到 运行 一个 git 回购,它利用了一些 Topics/Kafka 所以我的问题......
- 我该如何解决这个问题(我在企业 VPN 后面,但我认为这不应该影响这个)
- 我什至需要 SchemaRegistry 吗?
我最终只使用了内部的 Docker 本地设置,我必须对 docker compose YAML 进行的唯一更改是更改模式注册表端口(我更改了它到 8082 或 8084,记不太清楚了,只是 docker-compose.yaml 中列出的其他 Confluent 服务未使用的未使用端口,我的本地设置现在工作正常
我从官方汇合站点下载了汇合版本 7.0.0
的 .tz(我在 MAC),并遵循 LOCAL[=33 的设置=](1 个节点)和 Kafka/ZooKeeper 启动正常,但 Schema Registry 一直失败(请注意,我支持企业 VPN)
SchemaRegistry 日志中的异常消息是:
[2021-11-04 00:34:22,492] INFO Logging initialized @1403ms to org.eclipse.jetty.util.log.Slf4jLog (org.eclipse.jetty.util.log)
[2021-11-04 00:34:22,543] INFO Initial capacity 128, increased by 64, maximum capacity 2147483647. (io.confluent.rest.ApplicationServer)
[2021-11-04 00:34:22,614] INFO Adding listener: http://0.0.0.0:8081 (io.confluent.rest.ApplicationServer)
[2021-11-04 00:35:23,007] ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication)
io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryException: Failed to get Kafka cluster ID
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.kafkaClusterId(KafkaSchemaRegistry.java:1488)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.<init>(KafkaSchemaRegistry.java:166)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.initSchemaRegistry(SchemaRegistryRestApplication.java:71)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.configureBaseApplication(SchemaRegistryRestApplication.java:90)
at io.confluent.rest.Application.configureHandler(Application.java:271)
at io.confluent.rest.ApplicationServer.doStart(ApplicationServer.java:245)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:44)
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1784)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1928)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:180)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.kafkaClusterId(KafkaSchemaRegistry.java:1486)
... 7 more
我的 schema-registry.properties
文件 bootstrap URL 设置为
kafkastore.bootstrap.servers=PLAINTEXT://localhost:9092
我看到一些帖子说它的 SchemaRegistry 无法连接到 KafkaCluster URL 因为可能是本地主机地址。我是 Kafka 的新手,基本上只需要这个本地设置到 运行 一个 git 回购,它利用了一些 Topics/Kafka 所以我的问题......
- 我该如何解决这个问题(我在企业 VPN 后面,但我认为这不应该影响这个)
- 我什至需要 SchemaRegistry 吗?
我最终只使用了内部的 Docker 本地设置,我必须对 docker compose YAML 进行的唯一更改是更改模式注册表端口(我更改了它到 8082 或 8084,记不太清楚了,只是 docker-compose.yaml 中列出的其他 Confluent 服务未使用的未使用端口,我的本地设置现在工作正常