1. Problem description
A certain user feedback, Kafka failed to consume the message here, the error reported that the consumer was kicked out of the consumption group or the broker status was abnormal and could not be connected. After the actual verification port was indeed unreachable, the on-site test verification reported an error: Error:
Failed to find brokers to send ListGroups... find Coondinator failed, that is, the leader cannot be found
2. Analysis and processing
2.1. Check consumer information and topic status on the spot
As shown above, the missing broker node cannot be found, and it is found that there is an unexpected node, which is confirmed to be an abnormal configuration.
2.2. Consumption Test
2.3. Permission Confirmation
As shown in the figure above, there is no group permission; add group permission
bin/kafka-acls.sh --authorizer kafka.security.auth.SimpleAclAuthorizer
--authorizer-properties zookeeper.connect=172.18.1.112:2181 --add
--allow-principal User:producer --operation Read --group test-group
It is found that the authorized user of the topic is inconsistent with the consumer user name configured in consumer.properties
2.4 Delete/offline redundant borkers, migrate partitions
broker 1 (172.18.1.112)
broker 2 (172.18.1.162)
broker 3 (172.18.1.197)
broker 4 (172.18.1.198) ------> offline the node
#topic情况查看
./bin/kafka-topics.sh --describe --zookeeper 172.18.1.198:2181 --topic YWPT-*
#编写 kafka_rebalance_replicas.json
https://www.orchome.com/454
https://www.orchome.com/36
https://blog.csdn.net/qq_32907195/article/details/126236204