The kafka cluster reports an error and cannot find the broker

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:
insert image description here
Failed to find brokers to send ListGroups... find Coondinator failed, that is, the leader cannot be found
insert image description here

2. Analysis and processing

2.1. Check consumer information and topic status on the spot

insert image description here
insert image description here
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.
insert image description here

2.2. Consumption Test

insert image description here

2.3. Permission Confirmation

insert image description here
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

insert image description here
It is found that the authorized user of the topic is inconsistent with the consumer user name configured in consumer.properties

insert image description here

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

Guess you like

Origin blog.csdn.net/ximenjianxue/article/details/131123973