Kafka Exception InvalidConfigurationException
org.apache.kafka.common.errors.InvalidConfigurationException
Non-retriable
Admin
InvalidConfigurationException is a Kafka exception (org.apache.kafka.common.errors.InvalidConfigurationException).
Common Causes
- Topic or broker config value is outside the allowed range or of the wrong type (e.g., retention.ms=-5, min.insync.replicas=0)
- Unrecognized config key passed to kafka-configs.sh --alter (typo, or config removed in the broker version being used)
- Conflicting config values (e.g., min.insync.replicas > replication factor for the topic)
Solutions
- Validate config values against the broker's documented valid range before applying; use kafka-configs.sh --describe to check current values
- Check the exact error message in broker logs — it identifies the offending key and why it is invalid
- Ensure min.insync.replicas <= replication factor for every topic; alert on this invariant in your provisioning tooling
Example Stack Trace
org.apache.kafka.common.errors.InvalidConfigurationException: Configuration is invalid.Diagnostic Commands
# Describe topic-level configuration overrides
kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name <topic> --describe
# Look for config validation errors in logs
grep 'INVALID_CONFIG\|Invalid config\|configuration is invalid' /var/log/kafka/server.log | tail -20Related
Protocol error: INVALID_CONFIG (code 40)
Related Admin exceptions: InvalidPartitionsException · InvalidReplicationFactorException · InvalidTopicException · PolicyViolationException · ThrottlingQuotaExceededException · TopicExistsException · UnsupportedVersionException
Hitting
InvalidConfigurationException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.