请选择 进入手机版 | 继续访问电脑版
MSIPO技术圈 首页 IT技术 查看内容

安装最新版CMAK,处理报错java.util.NoSuchElementException: key not found: PLAINTEXT

2023-07-13

一、下载CMAK

CMAK下载地址:

二、解压CMAK

unzip cmak-3.0.0.6.zip

三、修改配置文件

  • 设置zookeeper集群地址,主要设置kafka-manager.zkhosts,cmak.zkhosts两个参数
  • 注释kafka-manager.zkhosts,cmak.zkhosts

四、安装jdk11

  • CMAK要求jdk11

五、启动CMAK

./cmak

六、CMAK界面设置Kafka集群信息

在这里插入图片描述

七、完整报错

  • 2023-07-07 00:56:56,337 - [ERROR] - from kafka.manager.actor.cluster.KafkaStateActor in kafka-manager-system-akka.actor.default-dispatcher-11
    KafkaTopicOffsetGetter exception
    java.util.NoSuchElementException: key not found: PLAINTEXT
    at scala.collection.immutable.Map M a p 1. a p p l y ( M a p . s c a l a : 114 ) a t k a f k a . m a n a g e r . a c t o r . c l u s t e r . K a f k a S t a t e A c t o r Map1.apply(Map.scala:114) at kafka.manager.actor.cluster.KafkaStateActor Map1.apply(Map.scala:114)atkafka.manager.actor.cluster.KafkaStateActorKafkaTopicOffsetGetter. a n o n f u n anonfun anonfunrun 22 ( K a f k a S t a t e A c t o r . s c a l a : 1492 ) a t k a f k a . m a n a g e r . a c t o r . c l u s t e r . K a f k a S t a t e A c t o r 22(KafkaStateActor.scala:1492) at kafka.manager.actor.cluster.KafkaStateActor 22(KafkaStateActor.scala:1492)atkafka.manager.actor.cluster.KafkaStateActorKafkaTopicOffsetGetter. a n o n f u n anonfun anonfunrun 22 22 22adapted(KafkaStateActor.scala:1484)
    at scala.collection.Iterator.foreach(Iterator.scala:941)
    at scala.collection.Iterator.foreach ( I t e r a t o r . s c a l a : 941 ) a t s c a l a . c o l l e c t i o n . A b s t r a c t I t e r a t o r . f o r e a c h ( I t e r a t o r . s c a l a : 1429 ) a t s c a l a . c o l l e c t i o n . M a p L i k e (Iterator.scala:941) at scala.collection.AbstractIterator.foreach(Iterator.scala:1429) at scala.collection.MapLike (Iterator.scala:941)atscala.collection.AbstractIterator.foreach(Iterator.scala:1429)atscala.collection.MapLikeDefaultKeySet.foreach(MapLike.scala:181)
    at kafka.manager.actor.cluster.KafkaStateActor K a f k a T o p i c O f f s e t G e t t e r . KafkaTopicOffsetGetter. KafkaTopicOffsetGetter.anonfun$run 21 ( K a f k a S t a t e A c t o r . s c a l a : 1484 ) a t s c a l a . u t i l . c o n t r o l . B r e a k s . b r e a k a b l e ( B r e a k s . s c a l a : 42 ) a t k a f k a . m a n a g e r . a c t o r . c l u s t e r . K a f k a S t a t e A c t o r 21(KafkaStateActor.scala:1484) at scala.util.control.Breaks.breakable(Breaks.scala:42) at kafka.manager.actor.cluster.KafkaStateActor 21(KafkaStateActor.scala:1484)atscala.util.control.Breaks.breakable(Breaks.scala:42)atkafka.manager.actor.cluster.KafkaStateActorKafkaTopicOffsetGetter. a n o n f u n anonfun anonfunrun 17 ( K a f k a S t a t e A c t o r . s c a l a : 1484 ) a t k a f k a . m a n a g e r . a c t o r . c l u s t e r . K a f k a S t a t e A c t o r 17(KafkaStateActor.scala:1484) at kafka.manager.actor.cluster.KafkaStateActor 17(KafkaStateActor.scala:1484)atkafka.manager.actor.cluster.KafkaStateActorKafkaTopicOffsetGetter. a n o n f u n anonfun anonfunrun 17 17 17adapted(KafkaStateActor.scala:1452)
    at scala.Option.fold(Option.scala:251)
    at kafka.manager.actor.cluster.KafkaStateActor$KafkaTopicOffsetGetter.run(KafkaStateActor.scala:1452)
    at java.base/java.lang.Thread.run(Thread.java:834)

八、报错原因

  • 这个是由于kafka集群的认证方式不对

九、解决方法

org.apache.kafka.common.security.plain.PlainLoginModule required username='********' password='********';

相关阅读

热门文章

    手机版|MSIPO技术圈 皖ICP备19022944号-2

    Copyright © 2024, msipo.com

    返回顶部