Details
Description
When `kafka-acls.sh` with SimpleAclAuthorizer on target Kafka cluster with 1.1.1 version, it throws the below error.
kafka.common.KafkaException: DelegationToken not a valid resourceType name. The valid names are Topic,Group,Cluster,TransactionalId at kafka.security.auth.ResourceType$$anonfun$fromString$1.apply(ResourceType.scala:56) at kafka.security.auth.ResourceType$$anonfun$fromString$1.apply(ResourceType.scala:56) at scala.Option.getOrElse(Option.scala:121) at kafka.security.auth.ResourceType$.fromString(ResourceType.scala:56) at kafka.security.auth.SimpleAclAuthorizer$$anonfun$loadCache$1$$anonfun$apply$mcV$sp$1.apply(SimpleAclAuthorizer.scala:233) at kafka.security.auth.SimpleAclAuthorizer$$anonfun$loadCache$1$$anonfun$apply$mcV$sp$1.apply(SimpleAclAuthorizer.scala:232) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at kafka.security.auth.SimpleAclAuthorizer$$anonfun$loadCache$1.apply$mcV$sp(SimpleAclAuthorizer.scala:232) at kafka.security.auth.SimpleAclAuthorizer$$anonfun$loadCache$1.apply(SimpleAclAuthorizer.scala:230) at kafka.security.auth.SimpleAclAuthorizer$$anonfun$loadCache$1.apply(SimpleAclAuthorizer.scala:230) at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:216) at kafka.utils.CoreUtils$.inWriteLock(CoreUtils.scala:224) at kafka.security.auth.SimpleAclAuthorizer.loadCache(SimpleAclAuthorizer.scala:230) at kafka.security.auth.SimpleAclAuthorizer.configure(SimpleAclAuthorizer.scala:114) at kafka.admin.AclCommand$.withAuthorizer(AclCommand.scala:83) at kafka.admin.AclCommand$.addAcl(AclCommand.scala:93) at kafka.admin.AclCommand$.main(AclCommand.scala:53) at kafka.admin.AclCommand.main(AclCommand.scala)
This is because it tries to get all the resource types registered from ZK path and it throws error when `DelegationToken` resource is not defined in `ResourceType` of client's Kafka version(which is earlier than 1.1.x)
Attachments
Issue Links
- duplicates
-
KAFKA-7425 Kafka Broker -Unable to start
- Resolved
- links to