Skip to content
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

EOF on most operations #146

Closed
konart opened this issue Feb 3, 2023 · 6 comments
Closed

EOF on most operations #146

konart opened this issue Feb 3, 2023 · 6 comments

Comments

@konart
Copy link
Contributor

konart commented Feb 3, 2023

For some reason kafkactl (sarama?) cant decode packet for consumer-group related commands

❯ kafkactl get consumer-groups -V
[sarama  ] 2023/02/03 22:03:42 Connected to broker at broker1 (registered as #1)
[sarama  ] 2023/02/03 22:03:42 Error while sending ApiVersionsRequest to broker broker3: kafka: insufficient data to decode packet, more bytes expected
[sarama  ] 2023/02/03 22:03:42 Error while sending ApiVersionsRequest to broker broker2: kafka: insufficient data to decode packet, more bytes expected
[sarama  ] 2023/02/03 22:03:42 Error while sending ApiVersionsRequest to broker broker1: kafka: insufficient data to decode packet, more bytes expected
failed to describe consumer groups: EOF

kafkactl version:

cmd.info{version:"v3.0.3", buildTime:"2023-02-01T08:56:44Z", gitCommit:"f7ee6fc", goVersion:"go1.19.5", compiler:"gc", platform:"darwin/amd64"}

Kafka version\config is unchanged on server

@konart konart closed this as completed Feb 3, 2023
@konart konart reopened this Feb 3, 2023
@konart
Copy link
Contributor Author

konart commented Feb 3, 2023

I've checkd older versions - turns out v3.0.3 and v.3.0.2 are affected for me. No Problems with v3.0.1

@faillefer
Copy link
Contributor

faillefer commented Mar 1, 2023

Same problem here but only with older versions of kafka (2.3.0 <= version < 2.4.0)
Sarama tries to use the version 4 of DescribeGroupsRequest if kafka version is at least 2.3.0. But the version 4 has been introduced in 2.4.0 by KIP-345. I have this kind of errors when trying to execute those requests :

Exception while processing request from  <MASKED> (kafka.network.Processor)
org.apache.kafka.common.errors.InvalidRequestException: Error getting request for apiKey: DESCRIBE_GROUPS, apiVersion: 4, connectionId: <MASKED>  listenerName: ListenerName(SASL_SSL), principal: User:<MASKED> 
Caused by: java.lang.IllegalArgumentException: Invalid version for API key DESCRIBE_GROUPS: 4
	at org.apache.kafka.common.protocol.ApiKeys.schemaFor(ApiKeys.java:319)

There is a workaround though, you can set a kafkaVersion < to 2.3.0 in you config.yml and it will work (the version 0 of the request will be used)

@faillefer
Copy link
Contributor

For exemple :

contexts:
  default:
    kafkaversion: 2.2.2
    brokers:
    - localhost:9092

@d-rk
Copy link
Collaborator

d-rk commented Mar 2, 2023

I saw you already filed an issue to sarama (IBM/sarama#2443) 👍

@samba2
Copy link

samba2 commented Mar 8, 2023

Just in case you get here with this EOF message. Using the comments above I was able to even talk to ancient Kafka server:

contexts:
    some-system:
        brokers:
            - foo:9092
        kafkaversion: 0.11.0.1

@d-rk
Copy link
Collaborator

d-rk commented Nov 10, 2023

I guess this one is no longer an issue. The issue in sarama was fixed a while ago

@d-rk d-rk closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants