Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>

Thread.exclusive is deprecated, use Thread::Mutex
Sending Logstash logs to D:/code/logstash/logstash-7.4.2/logs which is now configured via log4j2.properties
[2024-01-16T16:51:36,256][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2024-01-16T16:51:36,273][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.4.2"}
[2024-01-16T16:51:38,339][INFO ][org.reflections.Reflections] Reflections took 35 ms to scan 1 urls, producing 20 keys and 40 values
D:/code/logstash/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-mongodb-3.1.7/lib/logstash/outputs/bson/big_decimal.rb:26: warning: already initialized constant BSON_TYPE
[2024-01-16T16:51:41,062][ERROR][logstash.outputs.mongodb ] Unknown setting 'document' for mongodb
[2024-01-16T16:51:41,062][ERROR][logstash.outputs.mongodb ] Unknown setting 'upsert' for mongodb
[2024-01-16T16:51:41,062][ERROR][logstash.outputs.mongodb ] Unknown setting 'document_id' for mongodb
[2024-01-16T16:51:41,077][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:100)", "org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:60)", "org.logstash.execution.JavaBasePipelineExt$INVOKER$i$1$0$initialize.call(JavaBasePipelineExt$INVOKER$i$1$0$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:837)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1156)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:1143)", "org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39)", "D_3a_.code.logstash.logstash_minus_7_dot_4_dot_2.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/java_pipeline.rb:26)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)", "org.jruby.RubyClass.newInstance(RubyClass.java:915)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "D_3a_.code.logstash.logstash_minus_7_dot_4_dot_2.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0(D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/pipeline_action/create.rb:36)", "D_3a_.code.logstash.logstash_minus_7_dot_4_dot_2.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0$__VARARGS__(D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/pipeline_action/create.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", "D_3a_.code.logstash.logstash_minus_7_dot_4_dot_2.logstash_minus_core.lib.logstash.agent.RUBY$block$converge_state$2(D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/agent.rb:326)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:77)", "org.jruby.runtime.Block.call(Block.java:129)", "org.jruby.RubyProc.call(RubyProc.java:295)", "org.jruby.RubyProc.call(RubyProc.java:274)", "org.jruby.RubyProc.call(RubyProc.java:270)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105)", "java.lang.Thread.run(Thread.java:748)"]}
warning: thread "Converge PipelineAction::Create<main>" terminated with exception (report_on_exception is true):
LogStash::Error: Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`
          create at org/logstash/execution/ConvergeResultExt.java:109
             add at org/logstash/execution/ConvergeResultExt.java:37
  converge_state at D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/agent.rb:339
[2024-01-16T16:51:41,087][ERROR][logstash.agent           ] An exception happened when converging configuration {:exception=>LogStash::Error, :message=>"Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`", :backtrace=>["org/logstash/execution/ConvergeResultExt.java:109:in `create'", "org/logstash/execution/ConvergeResultExt.java:37:in `add'", "D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/agent.rb:339:in `block in converge_state'"]}
[2024-01-16T16:51:41,119][FATAL][logstash.runner          ] An unexpected error occurred! {:error=>#<LogStash::Error: Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`>, :backtrace=>["org/logstash/execution/ConvergeResultExt.java:109:in `create'", "org/logstash/execution/ConvergeResultExt.java:37:in `add'", "D:/code/logstash/logstash-7.4.2/logstash-core/lib/logstash/agent.rb:339:in `block in converge_state'"]}
[2024-01-16T16:51:41,234][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Hi @bp_cs,

Welcome to the community! I see you are using an old version of Logstash (7.4.2) which is past EOL so I suggest upgrading if you can.

From the above error it looks like you are using the MongoDB output plugin for Logstash. Which version of the plugin you are using? Have you checked if it's compatible with the version of Logstash you're using?

It looks like you are using settings document, upsert and document_id that are not recognised by the plugin. Please share your config and we can take a look.

Hope that helps!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.