Kafka Error STALE_BROKER_EPOCH
Error code 77 · Non-retriable Broker
Broker epoch has changed.
Common Causes
- Broker was restarted and received a new epoch from the controller, but an in-flight request from before the restart used the old epoch
- Network partition caused a broker to re-register with the controller, incrementing its epoch, while old requests with the prior epoch are still in flight
- Controller sent an outdated LeaderAndIsr or UpdateMetadata request with a stale broker epoch (controller failover scenario)
Solutions
- No manual action needed — this error is handled internally between brokers and the controller; the controller will resend the request with the current epoch
- Investigate broker restarts or network instability if this appears frequently — stabilize the broker to prevent epoch increments
- Ensure controller and brokers are on the same Kafka version during upgrades to avoid epoch handling incompatibilities
Diagnostic Commands
# Look for related errors in broker logs
grep 'StaleBrokerEpoch\|broker.epoch\|STALE_BROKER_EPOCH' /path/to/kafka/logs/server.log | tail -20
# Look for related events in controller logs
grep 'Broker.*registered\|epoch' /path/to/kafka/logs/controller.log | tail -20
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.