Open ppf2 opened 8 years ago
I wrote a direct Kafka Java API client and reproduced this outside of Logstash:
Exception in thread "main" org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:648)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:542)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:524)
at test.main(test.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.kafka.common.config.ConfigException: request.timeout.ms should be greater than session.timeout.ms and fetch.max.wait.ms
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:557)
... 8 more
The Kafka client exception returned from the Kafka client is very clear on what the problem is here, except that we are not reporting the full exception stack at all (even at --debug) and throwing back something that is generic and not intuitive.
Unable to create Kafka consumer from given configuration {:kafka_error_message=>org.apache.kafka.common.KafkaException: Failed to construct kafka consumer, :level=>:error, :file=>"logstash/inputs/kafka.rb", :line=>"213", :method=>"create_consumer"}
A plugin had an unrecoverable error. Will restart this plugin.
We will need to improve our error handling and report the full exception stack.
Running LS 2.3.2 with kafka input plugin 3.0.2.
When attempting to set a session_timeout_ms to the input configuration:
Logstash fails with the error:
Also tried setting it to a number instead of a string (just in case the documentation is incorrect), doesn't work either: