Support Questions
Find answers, ask questions, and share your expertise

granting permissions to a Kafka topic error.

Highlighted

granting permissions to a Kafka topic error.

Mentor

Hi all,

I am implementing the additional Requirements for Atlas with Ranger and Kerberos following this document while granting permissions to a Kafka topic I get the below error.

I am running it as kafka user after grabbing a valid kerberos certificate.

$ /usr/hdp/current/kafka-broker/bin/kafka-acls.sh --topic ATLAS_HOOK --allow-principals * --operations All --authorizer-properties "zookeeper.connect=gateway-maxwell.com:2181,namenode-maxwell.com:2181,namenode-maxwell.com:2181"
Exception in thread "main" joptsimple.UnrecognizedOptionException: allow-principals is not a recognized option
        at joptsimple.OptionException.unrecognizedOption(OptionException.java:108)
        at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:449)
        at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56)
        at joptsimple.OptionParser.parse(OptionParser.java:381)
        at kafka.admin.AclCommand$AclCommandOptions.<init>(AclCommand.scala:521)
        at kafka.admin.AclCommand$.main(AclCommand.scala:43)
        at kafka.admin.AclCommand.main(AclCommand.scala)

What could I be doing wrong ? I am stuck

2 REPLIES 2
Highlighted

Re: granting permissions to a Kafka topic error.

Contributor
@Geoffrey Shelton Okot

Try this . Looks like a typo --allow-principals its should be --allow-principal

/usr/hdp/current/kafka-broker/bin/kafka-acls.sh --topic ATLAS_HOOK --allow-principal user:<atlas_user> --operations All --authorizer-properties "zookeeper.connect=gateway-maxwell.com:2181,namenode-maxwell.com:2181,namenode-maxwell.com:2181"

Re: granting permissions to a Kafka topic error.

Contributor

@Geoffrey Shelton Okot by default ambari will take care of this, if install using ambari.