confluent schema registry`unknowntopicorpartitionexception:此服务器不承载此主题分区`

b1uwtaje  于 2021-06-04  发布在  Kafka
关注(0)|答案(1)|浏览(385)

全新服务器,全新安装confluent-community-2.12版本5.3.1。
架构注册表配置为 /etc/schema-registry/schema-registry.properties 包含(我匿名IP+主机名):


# fyi, kafkastore.connection.url is not specified

listeners=http://0.0.0.0:8081
kafkastore.bootstrap.servers=PLAINTEXT://kafka-broker-xxx-1:9092,PLAINTEXT://kafka-broker-xxx-2:9092,PLAINTEXT://kafka-broker-xxx-3:9092
kafkastore.topic=_schemas
debug=false

当我创业时,我得到:

[2019-11-06 20:58:02,212] INFO Logging initialized @361ms to org.eclipse.jetty.util.log.Slf4jLog (org.eclipse.jetty.util.log:193)
[2019-11-06 20:58:02,506] INFO Initializing KafkaStore with broker endpoints: PLAINTEXT://ip-xxx-xx-xx-xx.us-west-2.compute.internal:9092,PLAINTEXT://ip-xxx-xx-xx-xx.us-west-2.compute.internal:9092,PLAINTEXT://ip-xxx-xx-xx-xx.us-west-2.compute.internal:9092 (io.confluent.kafka.schemaregistry.storage.KafkaStore:105)
[2019-11-06 20:58:02,725] INFO Creating schemas topic _schemas (io.confluent.kafka.schemaregistry.storage.KafkaStore:190)
[2019-11-06 20:58:02,749] INFO Validating schemas topic _schemas (io.confluent.kafka.schemaregistry.storage.KafkaStore:233)
[2019-11-06 20:58:02,759] ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication:68)
io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryInitializationException: Error initializing kafka store while initializing schema registry
        at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:224)
        at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.initSchemaRegistry(SchemaRegistryRestApplication.java:66)
        at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.configureBaseApplication(SchemaRegistryRestApplication.java:81)
        at io.confluent.rest.Application.createServer(Application.java:205)
        at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:42)
Caused by: io.confluent.kafka.schemaregistry.storage.exceptions.StoreInitializationException: Failed trying to create or validate schema topic configuration
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.createOrVerifySchemaTopic(KafkaStore.java:179)
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:116)
        at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:222)
        ... 4 more
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
        at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
        at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
        at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:104)
        at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:272)
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.verifySchemaTopic(KafkaStore.java:237)
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.createSchemaTopic(KafkaStore.java:222)
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.createOrVerifySchemaTopic(KafkaStore.java:171)
        ... 6 more
Caused by: org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
disho6za

disho6za1#

我刚重新开始,感觉很好。
我相信在启动kafka代理和启动schema注册表之间需要更长的时间延迟。我把延迟时间设为15秒,我想只需要30秒。
我还排除了一些更复杂的下游问题,我认为这可能是一个根本问题造成的。
对于看到相同异常消息的其他人来说,这个qa可能值得留下,而不是删除。

相关问题