kafka
config_error
ai_generated
true
org.apache.kafka.connect.errors.ConnectException: Worker config must have exactly one of 'key.converter' or 'value.converter' set, but found 0
ID: kafka/connect-worker-config-mismatch
95%Fix Rate
89%Confidence
1Evidence
2024-06-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Kafka 3.6.0 | active | — | — | — |
| Kafka 3.7.0 | active | — | — | — |
| Kafka Connect 3.6.0 | active | — | — | — |
Root Cause
Kafka Connect worker is missing required converter configuration for key or value serialization, causing startup failure.
generic中文
Kafka Connect工作器缺少键或值序列化所需的转换器配置,导致启动失败。
Official Documentation
https://kafka.apache.org/documentation/#connect_configuringWorkarounds
-
95% success Add `key.converter=org.apache.kafka.connect.json.JsonConverter` and `value.converter=org.apache.kafka.connect.json.JsonConverter` in worker.properties, then restart the worker.
Add `key.converter=org.apache.kafka.connect.json.JsonConverter` and `value.converter=org.apache.kafka.connect.json.JsonConverter` in worker.properties, then restart the worker.
-
90% success Example fix in worker.properties: `key.converter=org.apache.kafka.connect.storage.StringConverter` and `value.converter=org.apache.kafka.connect.json.JsonConverter` for mixed formats.
Example fix in worker.properties: `key.converter=org.apache.kafka.connect.storage.StringConverter` and `value.converter=org.apache.kafka.connect.json.JsonConverter` for mixed formats.
-
85% success Check environment variable overrides: `echo $CONNECT_KEY_CONVERTER` and ensure they are not conflicting.
Check environment variable overrides: `echo $CONNECT_KEY_CONVERTER` and ensure they are not conflicting.
中文步骤
Add `key.converter=org.apache.kafka.connect.json.JsonConverter` and `value.converter=org.apache.kafka.connect.json.JsonConverter` in worker.properties, then restart the worker.
Example fix in worker.properties: `key.converter=org.apache.kafka.connect.storage.StringConverter` and `value.converter=org.apache.kafka.connect.json.JsonConverter` for mixed formats.
Check environment variable overrides: `echo $CONNECT_KEY_CONVERTER` and ensure they are not conflicting.
Dead Ends
Common approaches that don't work:
-
70% fail
The error says exactly one must be set; setting both does not fix the missing configuration.
-
80% fail
Defaults are not guaranteed and may not match the connector's data format.