mariadb.jdbc.Driver not loaded

Hi All,

I am trying to establish connectivity between mariadb and ELK. PFB conf file.

    input { 
  jdbc { 
    jdbc_validate_connection => true 
    jdbc_driver_library => "D:/ELK/logstash/logstash-core/lib/jars/mariadb-java-client-2.5.4.jar" 
    jdbc_driver_class => "org.mariadb.jdbc.Driver" 
    jdbc_connection_string => "jdbc:mariadb://localhost:3307/dbname" 
    jdbc_user => "root" 
    jdbc_password => "password" 
    schedule => "*/1 * * * *" 
    statement => "SELECT * from test" 
    sql_log_level => "debug" 
    record_last_run => true 
  } 
} 
output { 
  stdout { codec => json_lines }
  elasticsearch { 
      hosts => ["elasticsearch:9200"] 
      index => "mariadb-%{+YYYY.MM}" 
  } 
} 
PFB error
    [2020-07-20T11:21:52,136][ERROR][logstash.javapipeline    ][main][7210bc70672f880c3a57d8b8cdafd46b626dc0f330fa9154514c4fd986cda21f] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"root", schedule=>"*/1 * * * *", jdbc_validate_connection=>true, jdbc_password=><password>, statement=>"SELECT * from test", jdbc_driver_library=>"D:/ELK/logstash/logstash-core-plugin-api/mariadb-java-client-2.5.4.jar", jdbc_connection_string=>"jdbc:mariadb://localhost:3307/dbname", sql_log_level=>"debug", id=>"7210bc70672f880c3a57d8b8cdafd46b626dc0f330fa9154514c4fd986cda21f", jdbc_driver_class=>"org.mariadb.jdbc.Driver", record_last_run=>true, enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_fcad7c90-81e3-4377-9257-023cad590011", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"C:\\Users\\10113/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, lowercase_column_names=>true, use_prepared_statements=>false>
  Error: org.mariadb.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
  Exception: LogStash::PluginLoadingError
  Stack: D:/ELK/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:159:in `load_driver'
D:/ELK/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/inputs/jdbc.rb:273:in `run'
D:/ELK/logstash/logstash-core/lib/logstash/java_pipeline.rb:346:in `inputworker'
D:/ELK/logstash/logstash-core/lib/logstash/java_pipeline.rb:337:in `block in start_input'

Appreciate the support. Thanks

Have you tried it without the jdbc_driver_library parameter yet?

@Jenni: No....I haven't....If there is any reference, pls share... I will look for other options as well.

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