gpt4 book ai didi

apache-kafka - 无法启动 Confluent Schema Registry

转载 作者:行者123 更新时间:2023-12-04 17:41:10 27 4
gpt4 key购买 nike

我已经在 Ubuntu 16.04 机器上安装了 confluent 平台,最初我已经配置了 zookeeper、Kafka 和 ksql 并启动了 confluent 平台。
我能够看到以下消息。

 root@DESKTOP-DIB3097:/opt/kafkafull/confluent-5.1.0/bin# ./confluent start
This CLI is intended for development only, not for production
https://docs.confluent.io/current/cli/index.html
Using CONFLUENT_CURRENT: /tmp/confluent.HUlCltYT
Starting zookeeper
zookeeper is [UP]
Starting kafka
kafka is [UP]
Starting schema-registry
schema-registry is [UP]
Starting kafka-rest
kafka-rest is [UP]
Starting connect
connect is [UP]
Starting ksql-server
ksql-server is [UP]
Starting control-center
control-center is [UP]

现在一切正常,当我检查融合平台的状态时,我观察到 Schema 注册表、连接和控制中心都关闭了。

我检查了架构注册表的日志并发现了以下日志。

ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication)
io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryInitializationException: Error initializing kafka store while initializing schema registry
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:210)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.initSchemaRegistry(SchemaRegistryRestApplication.java:61)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:72)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:39)
at io.confluent.rest.Application.createServer(Application.java:201)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:41)
Caused by: io.confluent.kafka.schemaregistry.storage.exceptions.StoreInitializationException: io.confluent.kafka.schemaregistry.storage.exceptions.StoreException: Failed to write Noop record to kafka store.
at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:137)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:208)
... 5 more
Caused by: io.confluent.kafka.schemaregistry.storage.exceptions.StoreException: Failed to write Noop record to kafka store.
at io.confluent.kafka.schemaregistry.storage.KafkaStore.getLatestOffset(KafkaStore.java:422)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.waitUntilKafkaReaderReachesLastOffset(KafkaStore.java:275)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:135)
... 6 more
Caused by: java.util.concurrent.TimeoutException: Timeout after waiting for 60000 ms.
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:78)
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:30)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.getLatestOffset(KafkaStore.java:417)
... 8 more

最佳答案

我想,我找到了答案,
在 Kafka 配置文件中添加属性 host.name=host_ip_address 它将充当 Kafka 代理主机。因此,在所有包含 Kafka bootstrap 属性的配置文件中,将其更改为相应的主机名或 IP 地址,如下所示。

bootstrap.servers=192.168.0.193:9092
示例 :在架构注册表配置中,我已将以下属性从本地主机更改为相应的 IP 地址
kafkastore.bootstrap.servers=PLAINTEXT://192.168.0.193:9092 ##
在其他文件中检查属性 bootstrap.servers=192.168.0.193:9092指的是正确与否。
并检查架构注册表配置文件是否正确引用。
(您实际上可以检查和比较 /tmp/confluent kafka 日志中的配置文件)
现在更改所有配置文件后,服​​务已启动并运行。

关于apache-kafka - 无法启动 Confluent Schema Registry,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54441162/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com