Kafka常见报错警告异常解决案例

1.自行修改server.properties中broker id后造成与meta.properties中数据不匹配

kafka.common.InconsistentBrokerIdException: Configured broker.id 2 doesn’t match stored broker.id 1 in meta.properties. If you moved your data, make sure your configured broker.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
在这里插入图片描述

2.__consumer_offsets这个topic是由kafka自动创建的,默认49个,这个topic是不能被删除的!

Error while executing topic command : Topic __consumer_offsets is a kafka internal topic and is not allowed to be marked for deletion.
在这里插入图片描述

为什么这里会是这样存储__consumer_offsets的呢:

  • [1.] 将所有 N Broker 和待分配的 i 个 Partition 排序
  • [2.] 将第 i 个 Partition 分配到第(i mod n)个 Broker 上

3.删除topic时

Topic frist is already marked for deletion.
在这里插入图片描述

彻底删除topic:

  • [1. ] 删除Topic,delete.topic.enable=true这里要设置为true
  • [2. ] 删除log日志
  • [3. ] 删除ZK中的Topic记录

这里是引用

当然,这里是你delete.topic.enable设置为false时Zookeeper下才会有这个节点

~持续更新!

猜你喜欢

转载自blog.csdn.net/qq_39327985/article/details/85268097
今日推荐