conduktor.io ↗

Kafka Exception NotEnoughReplicasAfterAppendException

org.apache.kafka.common.errors.NotEnoughReplicasAfterAppendException
Retriable Broker

Number of insync replicas for the partition is lower than min.insync.replicas This exception is raised when the low ISR size is discovered *after* the message was already appended to the log. Producer retries will cause duplicates.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.common.errors.NotEnoughReplicasAfterAppendException: Messages are written to the log, but to fewer in-sync replicas than required.

Diagnostic Commands

# Check for under-replicated partitions kafka-topics.sh --describe --bootstrap-server localhost:9092 --under-replicated-partitions # Check replica offset lag and status kafka-log-dirs.sh --bootstrap-server localhost:9092 --broker-list <follower-broker-id> --describe | grep offsetLag

Related

Protocol error: NOT_ENOUGH_REPLICAS_AFTER_APPEND (code 20)

Related Broker exceptions: CorruptRecordException · FencedLeaderEpochException · LeaderNotAvailableException · NetworkException · NotEnoughReplicasException · NotLeaderOrFollowerException · TimeoutException · UnknownLeaderEpochException

Hitting NotEnoughReplicasAfterAppendException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.