Kafka Error UNRELEASED_INSTANCE_ID
Error code 111 · Non-retriable Consumer
The instance ID is still used by another member in the consumer group. That member must leave first.
Common Causes
- A static member (with `group.instance.id` set) crashed or was killed without sending a `LeaveGroup` request, and the group coordinator still considers the instance ID as in-use by the previous session.
- Two consumer processes were accidentally started with the same `group.instance.id` value (misconfigured deployment, duplicate pods in Kubernetes, or a stale process still running).
- Consumer restarts too quickly after a crash before the `session.timeout.ms` has elapsed, and the coordinator hasn't yet detected the previous session as dead.
Solutions
- Identify and terminate any zombie process still holding the instance ID: check all consumer processes in the deployment for duplicate `group.instance.id` values. Use `kafka-consumer-groups.sh --describe` to see which host/client is registered.
- If no live process is holding the ID, wait for the current member session timeout to elapse so the coordinator evicts the stale member, then retry. If stale members linger too long, lower the applicable session timeout rather than increasing it.
- Ensure proper shutdown hooks call `consumer.close()` (which sends `LeaveGroup`) rather than killing the JVM abruptly. In Kubernetes, use `preStop` lifecycle hooks with a sleep to allow graceful shutdown.
Diagnostic Commands
# Check group members for the instance ID
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group <group-id> | grep -E 'INSTANCE|HOST|CLIENT'
# Look for static member events in logs
grep 'UNRELEASED_INSTANCE_ID\|instance.id\|static member' /var/log/kafka/server.log | tail -50Related APIs
This error can be returned by: ConsumerGroupHeartbeat
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.