# Input-jdbc Mysql error : undefined method 'close\_jdbc\_connection'

**URL:** <https://discuss.elastic.co/t/input-jdbc-mysql-error-undefined-method-close-jdbc-connection/93831>\
**Category:** Logstash\
**Created:** [July 19, 2017, 7:12pm UTC](https://discuss.elastic.co/t/input-jdbc-mysql-error-undefined-method-close-jdbc-connection/93831 "2017-07-19T19:12:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![titovince35](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@titovince35](https://discuss.elastic.co/u/titovince35)\
**Post date:** [July 19, 2017, 7:12pm UTC](https://discuss.elastic.co/t/input-jdbc-mysql-error-undefined-method-close-jdbc-connection/93831/1 "2017-07-19T19:12:30Z")

</div>

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

```auto
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 :

```auto
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 :

```auto
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

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [July 21, 2017, 4:01pm UTC](https://discuss.elastic.co/t/input-jdbc-mysql-error-undefined-method-close-jdbc-connection/93831/2 "2017-07-21T16:01:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![titovince35](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@titovince35](https://discuss.elastic.co/u/titovince35)\
**Post date:** [July 22, 2017, 11:37am UTC](https://discuss.elastic.co/t/input-jdbc-mysql-error-undefined-method-close-jdbc-connection/93831/3 "2017-07-22T11:37:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 19, 2017, 11:38am UTC](https://discuss.elastic.co/t/input-jdbc-mysql-error-undefined-method-close-jdbc-connection/93831/4 "2017-08-19T11:38:05Z")

</div>

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