问题
[2023-06-01 09:59:16,781] ERROR [Broker id=0] Received LeaderAndIsrRequest with correlation id 1 from controller 1 epoch 2596 for partition cdctest_topic-0 (last update controller epoch 2596) but cannot become follower since the new leader -1 is unavailable. (state.change.logger)
root@kafka-1:/# kafka-topics --describe --topic cdctest_topic --zookeeper kafka-zookeeper-headless:2181
Topic:cdctest_topic PartitionCount:1 ReplicationFactor:1 Configs:
Topic: cdctest_topic Partition: 0 Leader: -1 Replicas: 0 Isr: 0
[zk: localhost:2181(CONNECTED) 4] get /brokers/topics/cdctest_topic/partitions/0/state
{"controller_epoch":2596,"leader":0,"version":1,"leader_epoch":4044,"isr":[0]}
### 修改zookeeper topic 分区状态
[zk: localhost:2181(CONNECTED) 4] set /brokers/topics/cdctest_topic/partitions/0/state {"controller_epoch":2596,"leader":0,"version":1,"leader_epoch":4044,"isr":[0]}
root@kafka-1:/# kafka-topics --describe --topic cdctest_topic --zookeeper kafka-zookeeper-headless:2181
Topic:cdctest_topic PartitionCount:1 ReplicationFactor:1 Configs:
Topic: cdctest_topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
文章来源地址https://www.toymoban.com/news/detail-467444.html
文章来源:https://www.toymoban.com/news/detail-467444.html
到了这里,关于kafka leader -1的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!