-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telegraf Kafka input plugin issue with latest Kafka (2.12-2.3.0) when configuring multiple Kafka consumers #6136
Comments
@adithyamk Could you try out one of these builds and see if it helps? |
I run into this error. ./telegraf -config telegraf3.toml |
Try setting |
kafka_2.12-2.3.0 So this fixes the issue. But I just want to bring to notice that this is not backward compatible, which makes sense. So with older version of kafka, kafka_2.11-0.11.0.1 and telegraf-1.12.0~9eb7c8dd, this configuration does not work (which would make sense if the kafka library has been updated in telegraf). |
Can you clarify what happens when you try to use it with Kafka 2.11-0.11.0.1? |
./telegraf -config telegraf3.toml Kafka error [2019-07-26 16:02:19,290] ERROR Closing socket for xx.xx.xx.xx:9092-xx.xx.xx.xx:52456 because of error (kafka.network.Processor) |
Does it help for that instance if `version = "0.11.0.1" is set? |
When I set the version to 0.11.0.1, it works. So, looks like I need to add version in the telegraf kafka consumer plugin. |
What I think I'll do then is automatically set the version to at least 0.10.2.0 if consumer groups are being used, because it wasn't previously required to have this set to use consumer groups. So long as the version is set to a value lower than your Kafka version it should work, but some functionality may not be available and it uses older APIs in some cases. Let's keep the issue open until the PR is merged, and I still need to do a bit of performance verification to make sure things are still running as expected. |
Yes, that should work. Thanks Daniel. |
Just found a bug in my new code, but I have to run, probably not safe to use the builds for long under load. Will work on an update early next week. |
Thanks Daniel. |
Relevant telegraf.conf:
System info:
Telegraf 1.10.4
kafka_2.12-2.3.0
Steps to reproduce:
./telegraf -config telegraf.toml
Expected behavior:
2019-07-18T15:56:11Z I! Starting Telegraf 1.10.4
2019-07-18T15:56:11Z I! Loaded inputs: kafka_consumer kafka_consumer
2019-07-18T15:56:11Z I! Loaded aggregators:
2019-07-18T15:56:11Z I! Loaded processors:
2019-07-18T15:56:11Z I! Loaded outputs: influxdb influxdb
2019-07-18T15:56:11Z I! Tags enabled: host=xxxxx
2019-07-18T15:56:11Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"xxxxx", Flush Interval:10s
2019-07-18T15:56:11Z I! Started the kafka consumer service, brokers: [localhost:9092], topics: [sample_topic]
2019-07-18T15:56:11Z I! Started the kafka consumer service, brokers: [localhost:9092], topics: [sample_topic2]
Actual behavior:
2019-07-18T15:56:11Z I! Starting Telegraf 1.10.4
2019-07-18T15:56:11Z I! Loaded inputs: kafka_consumer kafka_consumer
2019-07-18T15:56:11Z I! Loaded aggregators:
2019-07-18T15:56:11Z I! Loaded processors:
2019-07-18T15:56:11Z I! Loaded outputs: influxdb influxdb
2019-07-18T15:56:11Z I! Tags enabled: host=xxxxx
2019-07-18T15:56:11Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"xxxxx", Flush Interval:10s
2019-07-18T15:56:11Z I! Started the kafka consumer service, brokers: [localhost:9092], topics: [sample_topic]
2019-07-18T15:56:11Z I! Started the kafka consumer service, brokers: [localhost:9092], topics: [sample_topic2]
2019-07-18T15:56:11Z E! [inputs.kafka_consumer]: Error in plugin: kafka server: The provided member is not known in the current generation.
2019-07-18T15:56:12Z E! [inputs.kafka_consumer]: Error in plugin: kafka server: The provided member is not known in the current generation.
2019-07-18T15:56:13Z E! [inputs.kafka_consumer]: Error in plugin: kafka server: The provided member is not known in the current generation.
Additional info:
When we have two Kafka Consumer Plugins enabled, listening to two different topics and if they belong to the same consumer group, then this error occurs.
Workaround: Place the consumers in different consumer groups and this error does not exist.
The text was updated successfully, but these errors were encountered: