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]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Super Guru

SYMPTOM: - Enabled Ranger Kafka plugin via Ambari and restarted kafka service.

- kafka logs still populating with "Ranger Plugin returned null" error - check ranger logs and could not see any info about kafka policy download - checked /etc/ranger/test_kafka/policycache/ and the json file in that is empty!

bash-4.1# cd /etc/ranger/test_kafka/ 
bash-4.1# cd policycache/ 
bash-4.1# ls -ltr 
total 0 
-rw-r--r-- 1 kafka hadoop 0 Mar 2 16:00 kafka_test_kafka.json_old 
-rw-r--r-- 1 kafka hadoop 0 Mar 16 11:30 kafka_test_kafka.json_old1 
-rw-r--r-- 1 kafka hadoop 0 Mar 16 12:27 kafka_test_kafka.json 

- checked Test Connection for Kafka repo in Ranger. It was successful.

- The Ranger plugin audits, did not have info on the kafka plugin sync. - Thus the kafka plugin is not being synced in this case. Policy refresh not working. - Tried deleting the default kafka policy and created a new one however issue still exists. - Tried to use REST API to get the policy details however no output.

ERROR:

2016-03-02 16:47:34,607 ERROR [kafka-request-handler-6] apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer (RangerKafkaAuthorizer.java:202) - Ranger Plugin returned null. Returning false 

ROOT CAUSE: Issue was the missing class path /etc/kafka/conf in the kafka-broker process

RESOLUTION: Adding below lines to the Kafka > Advanced kafka-env > kafka-env template config resolved the plugin issue

if [ -f /etc/kafka/conf/kafka-ranger-env.sh ]; then
. /etc/kafka/conf/kafka-ranger-env.sh
fi
Restart Kafka
1,766 Views
Version history
Last update:
‎12-25-2016 11:02 AM
Updated by:
Contributors