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

Cluster authorization failed. #5

Open
DbIM opened this issue May 1, 2022 · 4 comments
Open

Cluster authorization failed. #5

DbIM opened this issue May 1, 2022 · 4 comments

Comments

@DbIM
Copy link

DbIM commented May 1, 2022

Can't send message to topic (

app.properties
spring.kafka.bootstrap-servers=rocket-01.srvs.cloudkafka.com:9094,rocket-02.srvs.cloudkafka.com:9094,rocket-03.srvs.cloudkafka.com:9094
spring.kafka.properties.security.protocol=SASL_SSL
spring.kafka.properties.sasl.mechanism=SCRAM-SHA-256
spring.kafka.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule
required username="login here" password="pass here";
cloudkarafka.topic=topic-default

2022-05-01 18:27:10.274 ERROR 1664 --- [ad | producer-1] o.a.k.clients.producer.internals.Sender : [Producer clientId=producer-1] Aborting producer batches due to fatal error

org.apache.kafka.common.errors.ClusterAuthorizationException: Cluster authorization failed.

@caosDvlp
Copy link

Hi! I'm having the same issue

@ivangfr
Copy link

ivangfr commented Jun 9, 2022

Hi, I was facing the same problem.

Btw, I've this project spring-cloud-stream-kafka-multi-topics-cloudkarafka where I've implemented a pair producer / consumer using spring-kafka and another pair using spring-cloud-stream. Both can be used connecting to a CloudKarafka account or connecting to a Kafka-Zookeeper running locally in your machine.

Today, I've tried to upgrade my project, and I've faced with this ClusterAuthorizationException issue that only happens with the spring-kafka producer. Meanwhile, the spring-kafka consumer and the another spring-cloud-stream pair producer / consumer are working fine.

Researching around, I've found this

In short, if you are using spring-kafka and your spring-boot version is >= 2.6, in order to solve ClusterAuthorizationException issue, just set the following in your application.properties

spring.kafka.producer.properties.enable.idempotence=false

@caosDvlp
Copy link

caosDvlp commented Jun 18, 2022 via email

@YyuriD
Copy link

YyuriD commented Aug 3, 2024

Thank you very much!!!!!! I spent half a day on this...

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