Logstash-6.2.4 Error while running conf

Plugin:LogStash::Inputs::Jdbc jdbc_connection_string=>"jdbc:mysql://localhost:3306/pall_new", jdbc_user=>"root", jdbc_password=>, jdbc_validate_connection=>true, jdbc_driver_library=>"home/vadim/www/Full/Search/logstash-6.2.4/mysql-connector-java-5.1.42.jar", jdbc_driver_class=>"Java::oracle.jdbc.driver.OracleDriver", statement=>"SELECT products_id, products_name FROM products_description", id=>"b6ca01ee0dc3c734a39863d404734e9e920f232dedd95d747220deb7bafef7e6", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_b7a7ab6e-0e21-4273-ac35-524b39c2352d", 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, parameters=>{"sql_last_value"=>2018-05-22 17:01:44 +0300}, last_run_metadata_path=>"/home/vadim/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
Error: Java::oracle.jdbc.driver.OracleDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
Exception: LogStash::ConfigurationError
Stack: /home/vadim/www/FULL/Search/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' /home/vadim/www/FULL/Search/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:220:in execute_statement'
/home/vadim/www/FULL/Search/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' /home/vadim/www/FULL/Search/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:250:in run'
/home/vadim/www/FULL/Search/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:514:in inputworker' /home/vadim/www/FULL/Search/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:507:in block in start_input'
[2018-05-23T14:06:04,151][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main

Hi,

You are trying to connect MySQL database. Why are you using oracle jdbc driver class?

I change jdbc_driver_class => "com.mysql.jdbc.Driver"

But the same mistake

Error: com.mysql.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?

"/" missing in mysql jdbc driver path. Try with adding slash.

1 Like

jdbc_driver_library => "/home/vadim/www/Full/Search/logstash-6.2.4/mysql-connector-java-8.0.11.jar"

but I have the same error. Error: com.mysql.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
Exception: LogStash::ConfigurationError

I move file to /var/www/ and error fixed.
But in the end I have another error:

[2018-05-23T17:39:03,383][INFO ][logstash.pipeline ] Pipeline has terminated {:pipeline_id=>"main", :thread=>"#<Thread:0x41822b3a run>"}

I don't think it is an error log. Did you check elasticsearch index?

Yes

{"products":{"aliases":{},"mappings":{"products_description":{"properties":{"@timestamp":{"type":"date"},"@version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"categories_name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"products_id":{"type":"long"},"products_keywords":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"products_name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"products_page_url":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}},"settings":{"index":{"creation_date":"1527086229995","number_of_shards":"5","number_of_replicas":"1","uuid":"gXOja3AwSviIGD0kcn32sg","version":{"created":"6020499"},"provided_name":"products"}}}}

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