突然间,有几个主题变成了一个复制品 在日志中出现这样的错误 我该怎么办?
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: kafka.common.NotAssignedReplicaException: Leader 1 failed to record follower 2's position -1 since the replica is not recognized to be one of the assigned replicas 1,3,4 for partition [impression,3].
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.cluster.Partition.updateReplicaLogReadResult(Partition.scala:249)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.ReplicaManager$$anonfun$updateFollowerLogReadResults$2.apply(ReplicaManager.scala:905)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.ReplicaManager$$anonfun$updateFollowerLogReadResults$2.apply(ReplicaManager.scala:902)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.ReplicaManager.updateFollowerLogReadResults(ReplicaManager.scala:902)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.ReplicaManager.fetchMessages(ReplicaManager.scala:475)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.KafkaApis.handleFetchRequest(KafkaApis.scala:523)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.KafkaApis.handle(KafkaApis.scala:79)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:60)
May 04 14:17:23 2kafka01.rtty.in kafka-server-start.sh[149443]: at java.lang.Thread.run(Thread.java:745)
答案 0 :(得分:0)
所有KAFKA经纪人都会选择一个作为控制器代理,可以通过zookeeper znode /controller
获取,尝试重新启动此代理。更多信息,请参阅apache kafka wiki。
如果可以重新启动KAFKA集群(所有经纪人),建议使用。