kafka
config_error
ai_generated
true
org.apache.kafka.common.errors.InvalidRequiredAcksException: The required acks value is invalid.
ID: kafka/invalid-required-acks
90%Fix Rate
90%Confidence
1Evidence
2023-12-05First Seen
Root Cause
The producer sent a request with an invalid 'acks' value (e.g., -2 or 3) that is not in the allowed set of -1, 0, or 1.
generic中文
生产者发送了具有无效 'acks' 值(例如 -2 或 3)的请求,该值不在允许的 -1、0 或 1 集合中。
Official Documentation
https://kafka.apache.org/documentation/#producerconfigs_acksWorkarounds
-
90% success Set acks to a valid value in the producer properties: `props.put('acks', 'all')` (equivalent to -1) or `props.put('acks', '1')`. Example fix: change `acks=-2` to `acks=1`.
Set acks to a valid value in the producer properties: `props.put('acks', 'all')` (equivalent to -1) or `props.put('acks', '1')`. Example fix: change `acks=-2` to `acks=1`.
中文步骤
Set acks to a valid value in the producer properties: `props.put('acks', 'all')` (equivalent to -1) or `props.put('acks', '1')`. Example fix: change `acks=-2` to `acks=1`.
Dead Ends
Common approaches that don't work:
-
80% fail
Setting acks to 'all' (string) instead of -1 (integer) in the producer config causes a different error; this error specifically catches invalid integer values.
-
100% fail
Ignoring the error and retrying with the same value will fail repeatedly; the config must be corrected.