AxonOps — AI-Native Control Plane for Open Source Data Platforms
Kafka Protocol Error Codes
This document provides a complete reference of all Kafka protocol error codes, including retriability classification, the introduced version, and default error messages.
The Message column is the default error message defined in Kafka source. Client handling decisions should be based on the error code and retriable status; patterns below outline typical handling flows.
There is no leader for this topic-partition as we are in the middle of a leadership election.
6
NOT_LEADER_OR_FOLLOWER
✅
0.8.0
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.
The replica is not available for the requested topic-partition. Produce/Fetch requests and other requests intended only for the leader or follower return NOT_LEADER_OR_FOLLOWER if the broker is not a replica of the topic-partition.
10
MESSAGE_TOO_LARGE
❌
0.8.0
The request included a message larger than the max message size the server will accept.
11
STALE_CONTROLLER_EPOCH
❌
0.8.0
The controller moved to another broker.
12
OFFSET_METADATA_TOO_LARGE
❌
0.8.1
The metadata field of the offset request was too large.
13
NETWORK_EXCEPTION
✅
0.8.1
The server disconnected before a response was received.
14
COORDINATOR_LOAD_IN_PROGRESS
✅
0.9.0.0
The coordinator is loading and hence can’t process requests.
Messages are written to the log, but to fewer in-sync replicas than required.
21
INVALID_REQUIRED_ACKS
❌
0.9.0.0
Produce request specified an invalid value for required acks.
22
ILLEGAL_GENERATION
❌
0.9.0.0
Specified group generation id is not valid.
23
INCONSISTENT_GROUP_PROTOCOL
❌
0.9.0.0
The group member’s supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.
This is not the correct controller for this cluster.
42
INVALID_REQUEST
❌
0.10.1.0
This most likely occurs because of a request being malformed by the client library or the message was sent to an incompatible broker. See the broker logs for more details.
43
UNSUPPORTED_FOR_MESSAGE_FORMAT
❌
0.10.1.0
The message format version on the broker does not support the request.
44
POLICY_VIOLATION
❌
0.10.2.0
Request parameters do not satisfy the configured policy.
45
OUT_OF_ORDER_SEQUENCE_NUMBER
❌
0.11.0.0
The broker received an out of order sequence number.
The producer attempted a transactional operation in an invalid state.
49
INVALID_PRODUCER_ID_MAPPING
❌
0.11.0.0
The producer attempted to use a producer id which is not currently assigned to its transactional id.
50
INVALID_TRANSACTION_TIMEOUT
❌
0.11.0.0
The transaction timeout is larger than the maximum value allowed by the broker (as configured by transaction.max.timeout.ms).
51
CONCURRENT_TRANSACTIONS
✅
0.11.0.0
The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing.
52
TRANSACTION_COORDINATOR_FENCED
❌
0.11.0.0
Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer.
53
TRANSACTIONAL_ID_AUTHORIZATION_FAILED
❌
0.11.0.0
Transactional Id authorization failed.
54
SECURITY_DISABLED
❌
0.11.0.0
Security features are disabled.
55
OPERATION_NOT_ATTEMPTED
❌
0.11.0.0
The broker did not attempt to execute this operation. This may happen for batched RPCs where some operations in the batch failed, causing the broker to respond without trying the rest.
56
KAFKA_STORAGE_ERROR
✅
1.0.0
Disk error when trying to access log file on the disk.
57
LOG_DIR_NOT_FOUND
❌
1.0.0
The user-specified log directory is not found in the broker config.
This exception is raised by the broker if it could not locate the producer metadata associated with the producerId in question. This could happen if, for instance, the producer’s records were deleted because their retention time had elapsed. Once the last records of the producerId are removed, the producer’s metadata is removed from the broker, and future appends by the producer will return this exception.
60
REASSIGNMENT_IN_PROGRESS
❌
1.0.0
A partition reassignment is in progress.
61
DELEGATION_TOKEN_AUTH_DISABLED
❌
1.1.0
Delegation Token feature is not enabled.
62
DELEGATION_TOKEN_NOT_FOUND
❌
1.1.0
Delegation Token is not found on server.
63
DELEGATION_TOKEN_OWNER_MISMATCH
❌
1.1.0
Specified Principal is not valid Owner/Renewer.
64
DELEGATION_TOKEN_REQUEST_NOT_ALLOWED
❌
1.1.0
Delegation Token requests are not allowed on PLAINTEXT/1-way SSL channels and on delegation token authenticated channels.
65
DELEGATION_TOKEN_AUTHORIZATION_FAILED
❌
1.1.0
Delegation Token authorization failed.
66
DELEGATION_TOKEN_EXPIRED
❌
1.1.0
Delegation Token is expired.
67
INVALID_PRINCIPAL_TYPE
❌
1.1.0
Supplied principalType is not supported.
68
NON_EMPTY_GROUP
❌
1.1.0
The group is not empty.
69
GROUP_ID_NOT_FOUND
❌
1.1.0
The group id does not exist.
70
FETCH_SESSION_ID_NOT_FOUND
✅
1.1.0
The fetch session ID was not found.
71
INVALID_FETCH_SESSION_EPOCH
✅
1.1.0
The fetch session epoch is invalid.
72
LISTENER_NOT_FOUND
✅
2.0.0
There is no listener on the leader broker that matches the listener on which metadata request was processed.
73
TOPIC_DELETION_DISABLED
❌
2.1.0
Topic deletion is disabled.
74
FENCED_LEADER_EPOCH
✅
2.1.0
The leader epoch in the request is older than the epoch on the broker.
75
UNKNOWN_LEADER_EPOCH
✅
2.1.0
The leader epoch in the request is newer than the epoch on the broker.
Each row includes an Introduced version derived from the first Kafka release tag where the error code appears in source. For 0.8.x this comes from core/src/main/scala/kafka/common/ErrorMapping.scala; for 0.9.0+ it comes from clients/src/main/java/org/apache/kafka/common/protocol/Errors.java.