Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.
Labels (1)

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,239 Views
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎12-25-2016 11:02 AM
Updated by:
Contributors
Top Kudoed Authors