Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ranger Policies Not Working for Kafka Topic

Highlighted

Ranger Policies Not Working for Kafka Topic

Contributor

Hi Team,

Our cluster has Kafka, Kerberos and Ranger installed. Recently we have enabled Ranger for Kafka.

Ranger Policies are working for Topics which are created after enabling ranger.

But Ranger Policies are not working for Topics which are created before enabling ranger.

We are getting below error while producing messaged to previously created "test4" topic:

[nifi@dev0075 ~]$ /usr/hdp/2.6.4.0-91/kafka/bin/kafka-console-producer.sh --broker-list dev0075.test.com:6667 --topic test4 --security-protocol SASL_PLAINTEXT

[2018-06-14 06:03:48,984] ERROR Error when sending message to topic test4 with key: null, value: 0 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 3 record(s) for test4-0 due to 1526 ms has passed since batch creation plus linger time
[2018-06-14 06:03:48,986] ERROR Error when sending message to topic test4 with key: null, value: 0 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 3 record(s) for test4-0 due to 1526 ms has passed since batch creation plus linger time
[2018-06-14 06:03:48,986] ERROR Error when sending message to topic test4 with key: null, value: 0 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 3 record(s) for test4-0 due to 1526 ms has passed since batch creation plus linger time

[2018-06-14 06:04:41,328] ERROR Error when sending message to topic test4 with key: null, value: 0 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for test4-0 due to 1532 ms has passed since batch creation plus linger time

In Ranger, we have assigned all policies to "nifi" user for "test4" topic. But still getting above error.

How to resolve it?

Are Ranger Policies not work for Topics which are created before enabling ranger.?

Please suggest.

Thanks in advance.

Don't have an account?
Coming from Hortonworks? Activate your account here