Open ppf2 opened 6 years ago
Wondering if we can add the pipeline_id as suffix. That would make it unique across the pipelines as well.
Encountered this exception, but there is only one kafka input in my pipeline, I wondered what happened.
Here is the message:
[2021-03-16T09:40:57,884][WARN ][org.apache.kafka.common.utils.AppInfoParser] Error registering AppInfo mbean
javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=logstash-0
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[?:1.8.0_131]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) ~[?:1.8.0_131]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) ~[?:1.8.0_131]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) ~[?:1.8.0_131]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) ~[?:1.8.0_131]
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[?:1.8.0_131]
at org.apache.kafka.common.utils.AppInfoParser.registerAppInfo(AppInfoParser.java:62) [kafka-clients-1.0.0.jar:?]
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:773) [kafka-clients-1.0.0.jar:?]
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:635) [kafka-clients-1.0.0.jar:?]
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:617) [kafka-clients-1.0.0.jar:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_131]
at org.jruby.javasupport.JavaConstructor.newInstanceDirect(JavaConstructor.java:246) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:61) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:139) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:77) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.java.proxies.ConcreteJavaProxy$InitializeMethod.call(ConcreteJavaProxy.java:48) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:77) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyClass.newInstance(RubyClass.java:1022) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.java.proxies.ConcreteJavaProxy$NewMethod.call(ConcreteJavaProxy.java:109) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:145) [jruby-complete-9.1.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_kafka_minus_8_dot_0_dot_6.lib.logstash.inputs.kafka.RUBY$method$create_consumer$0(/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-kafka-8.0.6/lib/logstash/inputs/kafka.rb:324) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:103) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:163) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:314) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:186) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.BlockBody.yield(BlockBody.java:116) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.Block.yield(Block.java:165) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerable$23.call(RubyEnumerable.java:846) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.CallBlock19.doYield(CallBlock19.java:97) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.BlockBody.yield(BlockBody.java:116) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.Block.yield(Block.java:165) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyFixnum.times(RubyFixnum.java:305) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyFixnum$INVOKER$i$0$0$times.call(RubyFixnum$INVOKER$i$0$0$times.gen) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:498) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyClass.finvoke(RubyClass.java:522) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.Helpers.invoke(Helpers.java:395) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:393) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerator.each(RubyEnumerator.java:323) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerator$INVOKER$i$each.call(RubyEnumerator$INVOKER$i$each.gen) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyClass.finvoke(RubyClass.java:512) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.Helpers.invoke(Helpers.java:383) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerable.callEach19(RubyEnumerable.java:116) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerable.collectCommon(RubyEnumerable.java:838) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerable.map(RubyEnumerable.java:830) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyEnumerable$INVOKER$s$0$0$map.call(RubyEnumerable$INVOKER$s$0$0$map.gen) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:498) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:77) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:428) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:355) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:83) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:179) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200) [jruby-complete-9.1.13.0.jar:?]
at usr.share.logstash.logstash_minus_core.lib.logstash.pipeline.RUBY$method$inputworker$0(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:512) [jruby-complete-9.1.13.0.jar:?]
at usr.share.logstash.logstash_minus_core.lib.logstash.pipeline.RUBY$method$inputworker$0$__VARARGS__(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:77) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:93) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:145) [jruby-complete-9.1.13.0.jar:?]
at usr.share.logstash.logstash_minus_core.lib.logstash.pipeline.RUBY$block$start_input$1(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:505) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:145) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:71) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.runtime.Block.call(Block.java:124) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyProc.call(RubyProc.java:289) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.RubyProc.call(RubyProc.java:246) [jruby-complete-9.1.13.0.jar:?]
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:104) [jruby-complete-9.1.13.0.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
FYI I found this issue and in my case my problem was: Multiple configuration files under /etc/logstash/conf.d/
Make sure you use a single configuration file.
Similar to https://github.com/logstash-plugins/logstash-input-kafka/issues/166 but a different cause.
Even with consumer threads set to 1, the following exception can occur when there are multiple Kafka input pipelines (with multiple workers) running concurrently.
Workaround is to set client_id to something unique across them.