Input-jdbc Mysql error : undefined method 'close_jdbc_connection'


(Vincent) #1

Hello all, I'm new to Elastic stack and I'm having a problem with input-jdbc on Mysql.

20:13:26.528 [[main]<jdbc] ERROR logstash.pipeline - A plugin had an unrecoverable error. Will restart this plugin.
  Plugin: <LogStash::Inputs::Jdbc jdbc_driver_library=>"/usr/share/java/mysql-connector-java.jar", jdbc_driver_class=>"com.mysql.jdbc.Driver", jdbc_connection_string=>"jdbc:mysql://127.0.0.1:3036/wf_sg", jdbc_user=>"root", jdbc_password=><password>, statement=>"SELECT * from activity;", id=>"aa5a0b8b240d1c8d0b530919aba7fa7b73df3268-1", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_725d48eb-2fab-4495-b148-9a3506252a89", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, 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"=>1970-01-01 00:00:00 UTC}, last_run_metadata_path=>"/home/falaki/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
  Error: undefined method `close_jdbc_connection' for #<Sequel::JDBC::Database:0x6a2350f1>

Most significant extract :

Error: undefined method `close_jdbc_connection' for #<Sequel::JDBC::Database:0x6a2350f1>
  • OS : Debian 7 (Wheezy) Linux 3.2.81-1 x86_64
  • Java : 1.8.0_31
  • Logstash : 5.5.0
  • Mysql 5.6.36

I'm executing /usr/share/logstash/bin/logstash -f simple-out.conf, with this config :

input {
    jdbc {
        jdbc_driver_library => "/usr/share/java/mysql-connector-java.jar"
        jdbc_driver_class => "com.mysql.jdbc.Driver"
        jdbc_connection_string => "jdbc:mysql://127.0.0.1:3036/wf_sg"
        jdbc_user => "root"
        jdbc_password => "darootpassword"
        statement => "SELECT * from activity"
    }
}
output {
    stdout { codec => json_lines }
}

I've seen other people having this issue recently on StackOverflow.
Thanks for yout help


(Andrew Cholakian) #2

Hmmm, looks like you've opened an issue here: https://github.com/logstash-plugins/logstash-input-jdbc/issues/227 I'll reply there.


(Vincent) #3

That's right. I'll follow on Github.
Thanx


(system) #4

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