gpt4 book ai didi

apache-kafka - 卡夫卡满怀期待地关门大吉。无法创建许可证主题

转载 作者:行者123 更新时间:2023-12-04 15:11:01 24 4
gpt4 key购买 nike

在 Kafka 启动时,多条消息被记录到 kafka/logs/kafkaServer.out并包含:

INFO [Admin Manager on Broker 0]: Error processing create topicrequest CreatableTopic(name='_confluent-license', numPartitions=1,replicationFactor=3, assignments=[],configs=[CreateableTopicConfig(name='cleanup.policy',value='compact'), CreateableTopicConfig(name='min.insync.replicas',value='2')]) (kafka.server.AdminManager)


大约 15 分钟后,Kafka 关闭并输出到 kafka/logs/kafkaServer.out是 :
org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 1.
[2020-12-08 04:04:15,951] ERROR [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown

(kafka.server.KafkaServer)org.apache.kafka.common.errors.TimeoutException: License topic could not be createdCaused by: org.apache.kafka.common.errors.InvalidReplicationFactorException:Replication factor: 3 larger than available brokers: 1.[2020-12-08 04:04:15,952] INFO [KafkaServer id=0] shutting down (kafka.server.KafkaServer)


Kafka 似乎关闭了,因为主题 _confluent-license 的复制因子设置为 3 ?我不是在创建主题 _confluent-license ,这是作为 Kafka 启动许可检查的一部分创建的吗?
为了修复,我修改了 /v5.5.0/etc/kafka/server.properties以便内部主题的复制因子为 1:
############################# Internal Topic Settings  #############################
# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
# For anything other than development testing, a value greater than 1 is recommended for to ensure availability such as 3.
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
而不是 3 :
#offsets.topic.replication.factor=3
#transaction.state.log.replication.factor=3
但这并不能解决问题,并且会生成相同的日志。 __consumer_offsets的复制因子依然是3。如何降低topic的复制因子 _confluent-license从 3 到 1 ?或者是否有其他问题导致 Kafka 关闭?

最佳答案

您应该更改属性 confluent.license.topic.replication.factor默认为 3。

关于apache-kafka - 卡夫卡满怀期待地关门大吉。无法创建许可证主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65196374/

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