Unable to install output-jdbc plugin on logstash

Hi
I am facing issue while connecting logstash output send to mysql database..below are my configuration setting
output {
jdbc{
driver_jar_path => "/app/logstash-CBS/mysql-connector-java-8.0.25.jar"
driver_class => "com.mysql.jdbc.Driver"
connection_string => "jdbc:mysql://172.23.224.174:3306/OLTP?autoReconnect=true&user=appmonitordb&password=Welcome@2021$"
statement => ["INSERT INTO CBS(timestamp,MessageId,Command,Id,dateTime,rspCode,DccID) values(?,?,?,?,?,?,?)","[timestamp]","[MessageId]","[Command]" ,"[Id]","[dateTime]","[rspCode]","[DccID"]
}
stdout { codec => rubydebug }
}
Post Configuration when we ran the logstash getting below mentioned error
./logstash -f ../../Setup/CBC.conf
Thread.exclusive is deprecated, use Thread::Mutex
Sending Logstash logs to /app/logstash-CBS/logs which is now configured via log4j2.properties
[2021-05-15T01:10:05,688][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2021-05-15T01:10:05,795][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.5.1"}
[2021-05-15T01:10:07,893][INFO ][org.reflections.Reflections] Reflections took 38 ms to scan 1 urls, producing 20 keys and 40 values
[2021-05-15T01:10:08,356][ERROR][logstash.plugins.registry] Tried to load a plugin's code, but failed. {:exception=>#<LoadError: no such file to load -- logstash/outputs/jdbc>, :path=>"logstash/outputs/jdbc", :type=>"output", :name=>"jdbc"}
[2021-05-15T01:10:08,374][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (PluginLoadingError) Couldn't find any output plugin named 'jdbc'. Are you sure this is correct? Trying to load the jdbc output plugin resulted in this error: no such file to load -- logstash/outputs/jdbc", :backtrace=>["org.logstash.config.ir.CompiledPipeline.(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)", "app.logstash_minus_CBS.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(/app/logstash-CBS/logstash-core/lib/logstash/java_pipeline.rb:27)", "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)", "app.logstash_minus_CBS.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0(/app/logstash-CBS/logstash-core/lib/logstash/pipeline_action/create.rb:36)", "app.logstash_minus_CBS.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0$VARARGS(/app/logstash-CBS/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)", "app.logstash_minus_CBS.logstash_minus_core.lib.logstash.agent.RUBY$block$converge_state$2(/app/logstash-CBS/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)"]}

Error Descriptiopn : output-jdbc plugin unable to upload

I tried to multiple steps as per suggested offline upload the output-jdbc plugin but still not able achieve the result.

Hi,

Which LogStash version are you using and where did you get the jdbc output plugin from?

The only jdbc output plugin I am aware of is: GitHub - theangryangel/logstash-output-jdbc: JDBC output for Logstash which is no longer maintained. This project only supported logStash 5.x and 6.x as far as I know.

It is possible that you are trying to install a plugin which does not support your LogStash version.

Best regards
Wolfram

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