Logstash with jdbc mssql-jdbc-6.4.0.jre9 error


(chen) #1

need your help
------------ env --------------------------------------

Logstash connect to MSSQL 2016 DB
JDBC = > mssql-jdbc-6.4.0.jre9,
JRE => jre1.8.0_172
windows 10
----------------- config ---------------------------------
input {
jdbc {
jdbc_driver_library => "D:\elk\logstash-6.2.4\lib\sqlserverdriver\mssql-jdbc-6.4.0.jre9"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://SQA2018:1433;databasename=SQA;"
jdbc_user => "sa"
jdbc_password => "abc1234567$"
schedule => "* * * * *"
jdbc_default_timezone => "Asia/Shanghai"
statement => "SELECT * FROM PRINT_JOB_LOG"
}
}
output {
stdout { codec => json_lines }
}

--------------- error -----------------------------------
Sending Logstash's logs to D:/elk/logstash-6.2.4/logs which is now configured via log4j2.properties
[2018-05-03T13:51:34,841][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"D:/elk/logstash-6.2.4/modules/fb_apache/configuration"}
[2018-05-03T13:51:34,873][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"D:/elk/logstash-6.2.4/modules/netflow/configuration"}
[2018-05-03T13:51:35,076][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-05-03T13:51:35,623][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.4"}
[2018-05-03T13:51:36,310][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-05-03T13:51:38,717][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-05-03T13:51:39,170][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x383ffe12 run>"}
[2018-05-03T13:51:39,342][INFO ][logstash.agent ] Pipelines running {:count=>1, :pipelines=>["main"]}
{ 2008 rufus-scheduler intercepted an error:
2008 job:
2008 Rufus::Scheduler::CronJob "* * * * *" {}
2008 error:
2008 2008
2008 LogStash::ConfigurationError
2008 com.microsoft.sqlserver.jdbc.SQLServerDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:162:in open_jdbc_connection' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:220:inexecute_statement'
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:264:in execute_query' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:245:inblock in run'
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:234:in do_call' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:258:indo_trigger'
2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:300:in block in start_work_thread' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:299:inblock in start_work_thread'
2008 org/jruby/RubyKernel.java:1292:in loop' 2008 D:/elk/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:289:inblock in start_work_thread'



(Magnus Bäck) #2

Does Logstash JDBC error java.lang.IllegalStateException help?


(chen) #3

thanks, ^^


(system) #4

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