Error when creating a topic

Hi,

Good day!

I encountered the error below when creating a topic named payments:


Error while executing topic command : KeeperErrorCode = NoAuth for /config/topics/Payments
[2023-05-05 17:07:06,027] ERROR org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /config/topics/Payments
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:120)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
        at kafka.zookeeper.AsyncResponse.maybeThrow(ZooKeeperClient.scala:564)
        at kafka.zk.KafkaZkClient.createRecursive(KafkaZkClient.scala:1646)
        at kafka.zk.KafkaZkClient.createOrSet$1(KafkaZkClient.scala:365)
        at kafka.zk.KafkaZkClient.setOrCreateEntityConfigs(KafkaZkClient.scala:375)
        at kafka.zk.AdminZkClient.createTopicWithAssignment(AdminZkClient.scala:93)
        at kafka.zk.AdminZkClient.createTopic(AdminZkClient.scala:57)
        at kafka.admin.TopicCommand$ZookeeperTopicService.createTopic(TopicCommand.scala:372)
        at kafka.admin.TopicCommand$TopicService.createTopic(TopicCommand.scala:200)
        at kafka.admin.TopicCommand$TopicService.createTopic$(TopicCommand.scala:195)
        at kafka.admin.TopicCommand$ZookeeperTopicService.createTopic(TopicCommand.scala:364)
        at kafka.admin.TopicCommand$.main(TopicCommand.scala:62)
        at kafka.admin.TopicCommand.main(TopicCommand.scala)
(kafka.admin.TopicCommand$)
[p_gpp_kafka@su51165196 

As the error indicates, your cluster has authentication enabled. Please reach out to your cluster administrator for how they recommend you create topics.

Hi ,
Check Permissions
Ensure that the user or application executing the Kafka topic command has the necessary permissions to create or modify topics. This typically involves appropriate access to ZooKeeper and Kafka cluster resources.
Authentication and Authorization
Verify that the authentication and authorization mechanisms are properly configured. Ensure that the user or application is authenticated and authorized to perform topic-related actions.
Update ZooKeeper ACLs
Check the Access Control Lists (ACLs) in ZooKeeper for the /config/topics path. Make sure that the user or application has the necessary permissions e.g., READ and WRITE for this path.