kafka javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=consumer-1(示

Posted legend-who

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kafka javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=consumer-1(示相关的知识,希望对你有一定的参考价值。

错误日志:

2019-10-11 17:50:48.744 WARN []-[o.a.k.clients.consumer.ConsumerConfig :173] The configuration num.replica.fetchers = 1 was supplied but isn‘t a known config.
2019-10-11 17:50:48.747 INFO []-[o.a.kafka.common.utils.AppInfoParser :82] Kafka version : 0.9.0.1
2019-10-11 17:50:48.747 INFO []-[o.a.kafka.common.utils.AppInfoParser :83] Kafka commitId : 23c69d62a0cabf06
2019-10-11 17:50:48.747 WARN []-[o.a.kafka.common.utils.AppInfoParser :59] Error registering AppInfo mbean
javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=consumer-1
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.apache.kafka.common.utils.AppInfoParser.registerAppInfo(AppInfoParser.java:57)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:640)

原因:kafa 分区数小于应用部署节点数

处理方式:kafka 为topic增加partition;至少大于等于应用部署节点数

命令: bin/kafka-topics.sh --alter --zookeeper 10.112.179.12:2181 --partitions 10 --topic gome

以上是关于kafka javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=consumer-1(示的主要内容,如果未能解决你的问题,请参考以下文章

Kafka(四)集群之kafka

kafka NoClassDefFoundError kafka / Kafka

解开Kafka神秘的面纱:kafka优雅应用

解开Kafka神秘的面纱:kafka优雅应用

kafka NoClassDefFoundError kafka/Kafka

Kafka原理及Kafka群集部署