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

SASL SCRAM is not working with Kafka 0.11.0.0 cluster (works with 2.0.0.0) #1918

Closed
sunyu129 opened this issue Apr 22, 2021 · 1 comment · Fixed by #1992
Closed

SASL SCRAM is not working with Kafka 0.11.0.0 cluster (works with 2.0.0.0) #1918

sunyu129 opened this issue Apr 22, 2021 · 1 comment · Fixed by #1992

Comments

@sunyu129
Copy link

kafka version: 0_11_0_0
go version: 1.12
sarama version: v1.28.0
command: ./... -brokers x.x.x.x:9094,x.x.x.x:9094,x.x.x.x:9094-username xxxx -passwd xxxx@123 -algorithm sha256

logs:
[Sarama] 2021/04/22 09:33:03 Initializing new client
[Sarama] 2021/04/22 09:33:03 client/metadata fetching metadata for all topics from broker x.x.x.x:9094
[Sarama] 2021/04/22 09:33:03 Failed to read SASL handshake header : EOF
[Sarama] 2021/04/22 09:33:03 Closed connection to broker x.x.x.x:9094
[Sarama] 2021/04/22 09:33:03 client/metadata got error from broker -1 while fetching metadata: EOF
[Sarama] 2021/04/22 09:33:03 client/metadata fetching metadata for all topics from broker x.x.x.x:9094
[Sarama] 2021/04/22 09:33:04 Failed to read SASL handshake header : EOF
[Sarama] 2021/04/22 09:33:04 Closed connection to broker x.x.x.x:9094
[Sarama] 2021/04/22 09:33:04 client/metadata got error from broker -1 while fetching metadata: EOF
[Sarama] 2021/04/22 09:33:04 client/metadata fetching metadata for all topics from broker x.x.x.x:9094
[Sarama] 2021/04/22 09:33:04 Failed to read SASL handshake header : EOF
[Sarama] 2021/04/22 09:33:04 Closed connection to broker x.x.x.x:9094

when i upgrade kafka version to 2_0_0_0
it is working
[Sarama] 2021/04/22 09:32:59 Initializing new client
[Sarama] 2021/04/22 09:32:59 client/metadata fetching metadata for all topics from broker x.x.x.x:9094
[Sarama] 2021/04/22 09:32:59 Successful SASL handshake. Available mechanisms: [PLAIN SCRAM-SHA-512 SCRAM-SHA-256]
[Sarama] 2021/04/22 09:32:59 SASL authentication succeeded
[Sarama] 2021/04/22 09:32:59 Connected to broker at x.x.x.x:9094 (unregistered)

@dnwe dnwe changed the title sasl is not working SASL SCRAM is not working with Kafka 0.11.0.0 cluster (works with 2.0.0.0) Apr 27, 2021
@zhaomoran
Copy link
Contributor

zhaomoran commented Jul 30, 2021

Sarama only support SaslHandshakeRequest V1,but Kafka 0.11.0.0 needs SaslHandshakeRequest V0,refer to kafka protocol. I have finish the code , and I will commit it later!

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

Successfully merging a pull request may close this issue.

2 participants