Kafka常見報錯警告異常解決案例
阿新 • • 發佈:2018-12-27
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下才會有這個節點
~持續更新!