librdkafka icon indicating copy to clipboard operation
librdkafka copied to clipboard

kafka cluster producer get "local_inconsistent" error when I stop one broker

Open wushuaizaiza opened this issue 3 years ago • 1 comments

Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ

Do NOT create issues for questions, use the discussion forum: https://github.com/edenhill/librdkafka/discussions

Description

1.Confluent.kafka version is 1.7.0. 2. Create kafka cluster by using one zookeeper, 3 brokers, 2 partions. 3. during produce kafka message, when i stop borker 1, get "Local_inconsistent" error and don't reuse other broker to deal with message

How to reproduce

  1. Create Kafka cluster by using 3 brokers. 3 broker detail is; broker.id=1 host.name=10.62.156.217 port=9092

broker.id=2 host.name=10.62.156.220 port=9093

broker.id=3 host.name=10.62.156.231 port=9094

  1. created topic MYTEST1 with Replication factor 3 and partition 2 As you can see broker 3 is leader of Partition 0 and broker 1 is leader of partition 1 [root@ustr-mvm-2796 kafka_2.13-2.7.0]# bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic MYTEST1 Topic: MYTEST1    PartitionCount: 2    ReplicationFactor: 3    Configs:      Topic: MYTEST1    Partition: 0    Leader: 3    Replicas: 3,2,1    Isr: 3,2,1     Topic: MYTEST1    Partition: 1    Leader: 1    Replicas: 1,3,2    Isr: 1,3,2 [root@ustr-mvm-2796 kafka_2.13-2.7.0]#

  2. bring down broker 1, and then producer message, As you can see after bring down the broker 1, leader of partion is 3. [root@ustr-mvm-2796 kafka_2.13-2.7.0]# bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic MYTEST1 Topic: MYTEST1    PartitionCount: 2    ReplicationFactor: 3    Configs:      Topic: MYTEST1    Partition: 0    Leader: 3    Replicas: 3,2,1    Isr: 3,2     Topic: MYTEST1    Partition: 1    Leader: 3    Replicas: 1,3,2    Isr: 3,2

  3. get "local_inconsistent" error

IMPORTANT: Always try to reproduce the issue on the latest released version (see https://github.com/edenhill/librdkafka/releases), if it can't be reproduced on the latest version the issue has been fixed.

Checklist

IMPORTANT: We will close issues where the checklist has not been completed.

Please provide the following information:

  • [x] librdkafka version (release number or git tag): <REPLACE with e.g., v0.10.5 or a git sha. NOT "latest" or "current">
  • [ ] Apache Kafka version: <REPLACE with e.g., 0.10.2.3>
  • [ ] librdkafka client configuration: <REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
  • [ ] Operating system: <REPLACE with e.g., Centos 5 (x64)>
  • [ ] Provide logs (with debug=.. as necessary) from librdkafka
  • [ ] Provide broker log excerpts
  • [ ] Critical issue

wushuaizaiza avatar Feb 23 '22 02:02 wushuaizaiza

Is this still an issue? Can you provide debug logs

anchitj avatar Jul 16 '24 12:07 anchitj