Logstash config file
''
input {
jdbc {
clean_run => true
jdbc_validate_connection => true
jdbc_driver_library => 'C:\Program Files (x86)\MySQL\Connector J 8 0\mysql-connector-java-8.0.22.jar'
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://192.168.10.25:3306/jobschema"
jdbc_user => "root"
jdbc_password => "Password@123"
#parameters => { "favorite_artist" => "Beethoven" }
schedule => "* * * * *"
statement => "SELECT jobid,jobname,executiontime,jobstatus from logstashplugin WHERE jobid > :sql_last_value"
use_column_value => true
tracking_column => "jobid"
#sincedb_path => "NULL"
}
}
Please find error log
Error: unable to load C:\Program Files (x86)\MySQL\Connector J 8 0\mysql-connector-java-8.0.22.jar from :jdbc_driver_library, file not readable (please check user and group permissions for the path)
Exception: LogStash::PluginLoadingError
Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:47:in block in load_driver_jars' org/jruby/RubyArray.java:1809:in
each'
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:42:in load_driver_jars' /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:25:in
load_driver'
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/inputs/jdbc.rb:275:in run' /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:405:in
inputworker'
/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:396:in block in start_input' [ERROR] 2021-02-11 18:03:03.184 [[main]<jdbc] javapipeline - A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"root", use_column_value=>true, tracking_column=>"jobid", schedule=>"* * * * *", jdbc_validate_connection=>true, jdbc_password=><password>, statement=>"SELECT jobid,jobname,executiontime,jobstatus from logstashplugin WHERE jobid > :sql_last_value", clean_run=>true, jdbc_driver_library=>"C:\\Program Files (x86)\\MySQL\\Connector J 8 0\\mysql-connector-java-8.0.22.jar", jdbc_connection_string=>"jdbc:mysql://192.168.10.25:3306/jobschema", id=>"57f7c5b7c715e23fe1716eb61c597650bcc52b9f8d3af4248b0f8d4c36f6ac0a", jdbc_driver_class=>"com.mysql.jdbc.Driver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_a5f66d68-9552-4234-b844-8eca786ef4f2", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"/root/.logstash_jdbc_last_run", tracking_column_type=>"numeric", record_last_run=>true, lowercase_column_names=>true, use_prepared_statements=>false> Error: unable to load C:\Program Files (x86)\MySQL\Connector J 8 0\mysql-connector-java-8.0.22.jar from :jdbc_driver_library, file not readable (please check user and group permissions for the path) Exception: LogStash::PluginLoadingError Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:47:in
block in load_driver_jars'
org/jruby/RubyArray.java:1809:in each' /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:42:in
load_driver_jars'
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:25:in load_driver' /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/inputs/jdbc.rb:275:in
run'
/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:405:in `inputworker'
That seems clear enough. Check whether the user running logstash has permission on each component of that path.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.