Confluent schema-registry `UnknownTopicOrPartitionException: на этом сервере не размещается этот раздел раздела. - PullRequest
0 голосов
/ 07 ноября 2019

Совершенно новые серверы, новая установка с confluent-community-2.12 версии 5.3.1.

Реестр схемы настроен на /etc/schema-registry/schema-registry.properties, содержащий (я анонимизировал ips + имена хостов):

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

1 Ответ

0 голосов
/ 08 ноября 2019

Я только что перезапустился, и это выглядело нормально.

Я считаю, что мне понадобилась более длительная задержка между запуском брокеров kafka и запуском реестра схемы. У меня была задержка 15 секунд, и я подозреваю, что она должна быть 30 секунд.

Я также устраняю некоторые более сложные проблемы в нисходящем направлении, и я подумал, что это могло быть основной причиной, вызывающей это.

Этот QA, вероятно, стоит оставить, а не удалять, для тех, кто видит такое же сообщение об исключении.

...