报错背景:
CDH启动kafka的时候出现报错情况,并且报错的节点挂掉。
报错现象:
Exiting Kafka due to fatal exception java.lang.AbstractMethodError: nl.techop.kafka.KafkaHttpMetricsReporter.logger()Lcom/typesafe/scalalogging/Logger; at kafka.utils.Logging$class.info(Logging.scala:66) at nl.techop.kafka.KafkaHttpMetricsReporter.info(KafkaHttpMetricsReporter.scala:23) at nl.techop.kafka.KafkaHttpMetricsReporter.init(KafkaHttpMetricsReporter.scala:42) at kafka.metrics.KafkaMetricsReporter$$anonfun$startReporters$1.apply(KafkaMetricsReporter.scala:66) at kafka.metrics.KafkaMetricsReporter$$anonfun$startReporters$1.apply(KafkaMetricsReporter.scala:64) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35) at kafka.metrics.KafkaMetricsReporter$.startReporters(KafkaMetricsReporter.scala:64) at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:27) at kafka.Kafka$.main(Kafka.scala:59) at com.cloudera.kafka.wrap.Kafka$.main(Kafka.scala:76) at com.cloudera.kafka.wrap.Kafka.main(Kafka.scala)
报错原因:
jar包冲突,仔细检查环境里面是不是有自己打的jar包里面正好有kafka的相关内容,并且放在了环境变量吧可以读取的目录。
报错解决:
删除冲突的jar包,或者更改环境变量,重启之后报错消失。