conduktor.io ↗

Kafka Error NOT_LEADER_OR_FOLLOWER

Error code 6 · Retriable Broker

For requests intended only for the leader, this error indicates that the broker is not the current leader. For requests intended for any replica, this error indicates that the broker is not a replica of the topic partition.

Common Causes

Solutions

Diagnostic Commands

# Check for under-replicated partitions kafka-topics.sh --describe --bootstrap-server localhost:9092 --under-replicated-partitions # Verify broker connectivity and API versions kafka-broker-api-versions.sh --bootstrap-server <broker>:9092 2>&1 | head -5

Related APIs

This error can be returned by: DescribeLogDirs · EndTxn · Fetch · InitProducerId · Produce · WriteTxnMarkers

Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.