Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-30-2017 09:33 AM
After enable ranger kafka plugin, execute command "/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list bigdata001:6667 --topic test5", but when I input content to send message, the result returns as follows:
[2017-03-30 17:06:45,507] WARN Error while fetching metadata with correlation id 0 : {test5=TOPIC_AUTHORIZATION_FAILED} (org.apache.kafka.clients.NetworkClient)
[2017-03-30 17:06:45,507] ERROR Error when sending message to topic test5 with key: null, value: 7 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TopicAuthorizationException: Not authorized to access topics: [test5]
[2017-03-30 17:11:45,563] WARN Error while fetching metadata with correlation id 1 : {test5=TOPIC_AUTHORIZATION_FAILED} (org.apache.kafka.clients.NetworkClient
Created 03-31-2017 05:14 AM
Created 03-30-2017 10:01 AM
Please login to Ranger UI http://RANGER_HOST:6080/index.html#!/policymanager/resource
Check the policies defined for Kafka (specially for topics) that you are not restricting access.
.
Purely at Kafka level you can check the permissions using the following utility:
# bin/kafka-acls.sh --list --topic <TOPIC_NAME>
.
Created on 03-30-2017 10:03 AM - edited 08-18-2019 02:07 AM
Yes, I defined a policy in ranger as follows:
Created 03-30-2017 10:17 AM
# bin/kafka-acls.sh --list --topic test5
After executing the command, there is no acls for topic test5.
Created 03-31-2017 05:14 AM
Created 03-31-2017 05:27 AM
OK, thank you for your reply.
Created 05-23-2018 07:10 PM
i am also getting the same error when i try to publish/consume messages.
I have created a topic with one partition, using kafka user , though i have 3 brokers in my kafka cluster, i have also authorized using ranger policy . When ever i alter the topic partitions to more than 1 then i get below error.
ERROR Error when sending message to topic partition_change1 with key: null, value: 4 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TopicAuthorizationException: Not authorized to access topics: [partition_change1]
I am facing this issue for quit sometime, i need to fix this as i have some business impact. ASAP.
Created 05-24-2018 12:58 PM
kafka server logs:
Retrying leaderEpoch request for partition hello-4 as the leader reported an error: CLUSTER_AUTHORIZATION_FAILED (kafka.server.ReplicaFetcherThread) [2018-05-24 10:11:55,890] INFO [ReplicaFetcher replicaId=1004, leaderId=1003, fetcherId=0] Retrying leaderEpoch request for partition hello-4 as the leader reported an error: CLUSTER_AUTHORIZATION_FAILED (kafka.server.ReplicaFetcherThread)
Any idea, why i am not getting cluster authorization to kafka topics ?
Created 05-24-2018 12:58 PM
More Logs :
Kafka Server Logs:
Retrying leaderEpoch request for partition hello-4 as the leader reported an error: CLUSTER_AUTHORIZATION_FAILED (kafka.server.ReplicaFetcherThread) [2018-05-24 10:11:55,890] INFO [ReplicaFetcher replicaId=1004, leaderId=1003, fetcherId=0] Retrying leaderEpoch request for partition hello-4 as the leader reported an error: CLUSTER_AUTHORIZATION_FAILED (kafka.server.ReplicaFetcherThread)
Created 04-14-2024 05:00 AM
Make Sure that HDFS Service checkbox is checked in ClouderaManager>Kafka>Configuration
For me after i checked HDFS Service it was resolved