运行Kafka服务器会引发NoClassDefFoundError异常

时间:2019-03-01 07:14:37

标签: apache-kafka apache-zookeeper

我在运行的Kafka服务器中收到很多NoClassDefFoundError信息。我不确定是什么原因造成的?还有其他人遇到过这个问题吗?

我正在使用Kafka v2.1.1和Java11。我最近升级到v2.1.1

更新: 请注意,在整个集群的5个经纪人中,只有2个经纪人会看到此异常。

例外1:

+-------------+---------+
| "Banana"    | ""      |
| "~A Apple"  | "One"   |
| "~B Orange" | "Two"   |
| "Banana ~C" | "Three" |
| "Apple ~CC" | "Four"  |
+-------------+---------+

例外2:

[2019-02-28 00:54:49,288] INFO Successfully authenticated client: authenticationID=rajputs/hostbased@UNIX.DESHAW.COM; authorizationID=rajputs/hostbased@UNIX.DESHAW.COM. (org.apache.kafka.common.security.authenticator.SaslServerCallbackHandler)
[2019-02-28 00:54:49,469] ERROR [KafkaApi-4] Error when handling request: clientId=consumer-2, correlationId=1686, api=METADATA, body={topics=[fps.rajputs.jpse.desim_se],allow_auto_topic_creation=true} (kafka.server.KafkaApis)
java.lang.NoClassDefFoundError: scala/collection/immutable/SortedMap$$anon$1
        at scala.collection.immutable.SortedMap.filterKeys(SortedMap.scala:87)
        at scala.collection.immutable.SortedMap.filterKeys$(SortedMap.scala:87)
        at scala.collection.immutable.TreeMap.filterKeys(TreeMap.scala:46)
        at kafka.security.auth.SimpleAclAuthorizer.$anonfun$getMatchingAcls$1(SimpleAclAuthorizer.scala:245)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
        at kafka.utils.CoreUtils$.inReadLock(CoreUtils.scala:257)
        at kafka.security.auth.SimpleAclAuthorizer.getMatchingAcls(SimpleAclAuthorizer.scala:233)
        at kafka.security.auth.SimpleAclAuthorizer.aclsAllowAccess$1(SimpleAclAuthorizer.scala:154)
        at kafka.security.auth.SimpleAclAuthorizer.authorize(SimpleAclAuthorizer.scala:159)
        at kafka.server.KafkaApis.$anonfun$authorize$1(KafkaApis.scala:371)
        at kafka.server.KafkaApis.$anonfun$authorize$1$adapted(KafkaApis.scala:371)
        at scala.Option.forall(Option.scala:247)
        at kafka.server.KafkaApis.authorize(KafkaApis.scala:371)
        at kafka.server.KafkaApis.$anonfun$handleTopicMetadataRequest$1(KafkaApis.scala:970)
        at kafka.server.KafkaApis.$anonfun$handleTopicMetadataRequest$1$adapted(KafkaApis.scala:970)
        at scala.collection.TraversableLike.$anonfun$partition$1(TraversableLike.scala:313)
        at scala.collection.immutable.Set$Set1.foreach(Set.scala:95)
        at scala.collection.TraversableLike.partition(TraversableLike.scala:313)
        at scala.collection.TraversableLike.partition$(TraversableLike.scala:311)
        at scala.collection.AbstractTraversable.partition(Traversable.scala:104)
        at kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:970)
        at kafka.server.KafkaApis.handle(KafkaApis.scala:109)
        at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:69)
        at java.base/java.lang.Thread.run(Thread.java:834)

0 个答案:

没有答案