Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7216

Exception while running kafka-acls.sh from 1.0 env on target Kafka env with 1.1.1

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 1.1.1, 2.0.0
    • Fix Version/s: 1.0.3, 1.1.2, 2.0.1, 2.1.0
    • Component/s: admin
    • Labels:
      None

      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

            Activity

              People

              • Assignee:
                omkreddy Manikumar
                Reporter:
                satish.duggana Satish Duggana
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: