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: grep for 'ERROR' or 'FATAL' around the timestamp of the failure — the root cause is always logged server-side even though the client gets -1
- Increase broker heap if GC logs show full GC events: set KAFKA_HEAP_OPTS='-Xms6g -Xmx6g' and enable GC logging with -Xlog:gc* to confirm
- 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.