Getting topic authorization error with MM2 : org.apache.kafka.common.errors.TopicAuthorizationException: The topic authorization is failed. #4638
Unanswered
Gulnaz2021
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Can you share the full YAMLs of the Kafka clusters and the MirrorMakers? Why do you have |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've deployed 3 clusters with authorization type simple, tls enabled with Strimzi operator version20, kafka application version 2.6.0 and trying the below scenario:
So, in the 2) approach I've observed topic authorization errors in the MM2 logs specific to the topics, though all the produced messages were getting consumed in the mirrored topic,
Error:
2021-03-23 13:52:24,935 WARN Could not create topic-partitions for my-topic2. (org.apache.kafka.connect.mirror.MirrorSourceConnector) [kafka-admin-client-thread | adminclient-14]
org.apache.kafka.common.errors.TopicAuthorizationException: The topic authorization is failed.
2021-03-23 13:52:24,935 WARN Could not create topic-partitions for mirrormaker2-cluster-status. (org.apache.kafka.connect.mirror.MirrorSourceConnector) [kafka-admin-client-thread | adminclient-14]
org.apache.kafka.common.errors.TopicAuthorizationException: The topic authorization is failed.
2021-03-23 13:52:24,935 WARN Could not create topic-partitions for heartbeats. (org.apache.kafka.connect.mirror.MirrorSourceConnector) [kafka-admin-client-thread | adminclient-14]
org.apache.kafka.common.errors.TopicAuthorizationException: The topic authorization is failed.
2021-03-23 13:52:24,935 WARN Could not create topic-partitions for strimzi.cruisecontrol.metrics. (org.apache.kafka.connect.mirror.MirrorSourceConnector) [kafka-admin-client-thread | adminclient-14]
org.apache.kafka.common.errors.TopicAuthorizationException: The topic authorization is failed.
2021-03-23 13:52:24,935 WARN Could not create topic-partitions for mirrormaker2-cluster-offsets. (org.apache.kafka.connect.mirror.MirrorSourceConnector) [kafka-admin-client-thread | adminclient-14]
org.apache.kafka.common.errors.TopicAuthorizationException: The topic authorization is failed.
And for 2)approach, when deployed the cluster with superuser, again observed below error in MM2 logs, though all the messages were getting consumed from the mirrored topic.
2021-03-24 12:29:07,767 ERROR Scheduler for MirrorSourceConnector caught exception in scheduled task: syncing topic configs (org.apache.kafka.connect.mirror.Scheduler) [Scheduler for MirrorSourceConnector-syncing topic configs]
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TopicAuthorizationException: Topic authorization failed.
at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
at org.apache.kafka.connect.mirror.MirrorSourceConnector.describeTopicConfigs(MirrorSourceConnector.java:375)
at org.apache.kafka.connect.mirror.MirrorSourceConnector.syncTopicConfigs(MirrorSourceConnector.java:276)
at org.apache.kafka.connect.mirror.Scheduler.run(Scheduler.java:93)
at org.apache.kafka.connect.mirror.Scheduler.executeThread(Scheduler.java:112)
at org.apache.kafka.connect.mirror.Scheduler.lambda$scheduleRepeating$0(Scheduler.java:50)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.kafka.common.errors.TopicAuthorizationException: Topic authorization failed.
Code added for the superuser in the cluster:
authorization:
type: simple
superUsers:
- CN=(source cluster user)
- CN=(target cluster user)
- CN=root
So, is there any specific configuration, I need to update. Can I please get help in this regard.
Beta Was this translation helpful? Give feedback.
All reactions