Got it

Error Message Stating "AdminOperationException" Is Displayed when a Kafka Topic Fails to Be Deleted

166 0 0 0 0

Hello, everyone! 

I will share with you how to deal with the problem of error message stating "AdminOperationException" is displayed when a kafka topic fails to be deleted.


Symptom

When running the following command on the Kafka client to set the access control list (ACL), it is found that topic ACL cannot be set.

kafka-topics.sh --delete --topic test4 --zookeeper 10.5.X.X:24002/kafka

Error message stating "ERROR kafka.admin.AdminOperationException: Error while deleting topic test4" is displayed.

The following describes the message details.

Error while executing topic command: Error while deleting topic test4[2017-01-25 06:00,750] ERROR kafka.admin.AdminOperationException: Error while deleting topic test4at kafka.admin.TopicCommand$$anonfun$deleteTopic$1.apply(TopicCommand.scala:177)at kafka.admin.TopicCommand$$anonfun$deleteTopic$1.apply(TopicCommand.scala:162)at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)at kafka.admin.TopicCommand$.deleteTopic(TopicCommand.scala:162)at kafka.admin.TopicCommand$.main(TopicCommand.scala:68)at kafka.admin.TopicCommand.main(TopicCommand.scala)(kafka.admin.TopicCommand$)

Possible Causes

  1. The user does not belong to the kafkaadmin group.

Fault Locating

  1. Run the Kafka client command to record the AdminOperationException exception.

  2. Kafka provides secure access interfaces since C60SPC200, therefore, only users in the kafkaamdin group are allowed to delete topics.

  3. Run the klist command to query the currently authenticated user.

    [root@10-10-X-X client]# klist

    Ticket cache: FILE:/tmp/krb5cc_0

    Default principal: test@HADOOP.COM


    Valid starting     Expires            Service principal

    01/25/17 11:06:48  01/26/17 11:06:45  krbtgt/HADOOP.COM@HADOOP.COM

    It can be seen that the currently authenticated user is test.

  4. Run the id command to query the user group information.

    [root@10-10-X-X client]# id testuid=20032(test) gid=10001(hadoop) groups=10001(hadoop),9998(ficommon),10003(kafka)

Solution

  1. Add the user to the kafkaadmin group.

  2. Run the id command to query the user group information.

    [root@10-10-X-X client]# id testuid=20032(test) gid=10001(hadoop) groups=10001(hadoop),9998(ficommon),10002(kafkaadmin),10003(kafka)

We warmly welcome you to enjoy our community!


Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.