3

我收到 javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info, id=foo。我现在使用的是 1.1.3 版本。如果我没有在消费者属性中设置 client.Id 一切正常:(

加里,我认为这也是错误。你能看看吗?

***props.put(ConsumerConfig.CLIENT_ID_CONFIG,"diwen");***

javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=diwen
    at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[na:1.8.0_121]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) ~[na:1.8.0_121]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) ~[na:1.8.0_121]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) ~[na:1.8.0_121]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) ~[na:1.8.0_121]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[na:1.8.0_121]
    at org.apache.kafka.common.utils.AppInfoParser.registerAppInfo(AppInfoParser.java:58) ~[kafka-clients-0.10.1.1.jar:na]
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:695) [kafka-clients-0.10.1.1.jar:na]
    at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:553) [kafka-clients-0.10.1.1.jar:na]
    at org.springframework.kafka.core.DefaultKafkaConsumerFactory.createKafkaConsumer(DefaultKafkaConsumerFactory.java:73) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.core.DefaultKafkaConsumerFactory.createConsumer(DefaultKafkaConsumerFactory.java:69) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.<init>(KafkaMessageListenerContainer.java:306) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.<init>(KafkaMessageListenerContainer.java:231) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer.doStart(KafkaMessageListenerContainer.java:181) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:202) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.listener.ConcurrentMessageListenerContainer.doStart(ConcurrentMessageListenerContainer.java:124) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at org.springframework.kafka.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:202) [spring-kafka-1.1.4.BUILD-20170405.010858-5.jar:na]
    at com.devon.demo.KafkaCassandraDedupApplication.main(KafkaCassandraDedupApplication.java:132) [classes/:na]
4

0 回答 0