Kafka Error UNKNOWN_SERVER_ERROR
Error code -1 · Non-retriable Broker
The server experienced an unexpected error when processing the request.
Common Causes
- Broker JVM OOM or GC pause causing internal exception not mapped to a specific error code
- Bug in broker code triggered by a specific message payload, topic config, or Kafka version
- Filesystem I/O error or disk full condition causing log write failure
Solutions
- Check broker logs immediately around the failure timestamp; UNKNOWN_SERVER_ERROR is only a wrapper, so the actionable cause is usually the specific exception logged on the broker
- If GC or OOM is involved, enable GC logging and size KAFKA_HEAP_OPTS from observed usage rather than guessing a fixed heap value
- If disk-related, run 'df -h' and 'iostat -x 1 5' on the broker host; clear old log segments or expand the volume
Diagnostic Commands
# Look for errors and crashes in broker logs
grep -E 'ERROR|FATAL|Exception|OutOfMemory' /var/log/kafka/server.log | tail -50
# Check for log directory errors on the broker
kafka-log-dirs.sh --bootstrap-server localhost:9092 --topic-list <topic> --describe | grep -i errorRelated APIs
This error can be returned by: DeleteShareGroupOffsets · EndTxn · InitProducerId · WriteTxnMarkers
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.