# Logstash container: Cannot find jar driver library file for JDBC Input Plugin

**URL:** <https://discuss.elastic.co/t/logstash-container-cannot-find-jar-driver-library-file-for-jdbc-input-plugin/129054>\
**Category:** Logstash\
**Created:** [April 23, 2018, 8:08am UTC](https://discuss.elastic.co/t/logstash-container-cannot-find-jar-driver-library-file-for-jdbc-input-plugin/129054 "2018-04-23T08:08:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJ\_NOURI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aj_nouri/32/29741_2.png) [@AJ\_NOURI](https://discuss.elastic.co/u/AJ_NOURI)\
**Post date:** [April 23, 2018, 8:08am UTC](https://discuss.elastic.co/t/logstash-container-cannot-find-jar-driver-library-file-for-jdbc-input-plugin/129054/1 "2018-04-23T08:08:02Z")

</div>

I am using logstash container and I would like to use **jdbc input plugin** to read a **remote mysql database.**  
I can see the plugin installed,

```
root@a547c877b6a4:/# /usr/share/logstash/bin/logstash-plugin list
...
logstash-input-jdbc
...
root@a547c877b6a4:/# 

```

But I cannot find the jar driver library to put in the configuration as instructed in the plugin repository:

```
input {
  jdbc {
    jdbc_driver_library => "/path/to/mysql-connector-java-5.1.33-bin.jar" <<<<<<<
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://host:port/database"
    jdbc_user => "user"
    jdbc_password => "password"
  # or jdbc_password_filepath => "/path/to/my/password_file"
    statement => "SELECT ..."
    jdbc_paging_enabled => "true"
    jdbc_page_size => "50000"
  }
}

```

From inside the container, nothing related to the wanted plugin:

```
root@a547c877b6a4:/# find / -name '*.jar' | grep -iE 'mysql|connector'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-libs-3.3.9/maven-home/lib/aether-connector-basic-1.0.2.v20150114.jar
root@a547c877b6a4:/# 

```

Any hint?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 23, 2018, 8:18am UTC](https://discuss.elastic.co/t/logstash-container-cannot-find-jar-driver-library-file-for-jdbc-input-plugin/129054/2 "2018-04-23T08:18:48Z")

</div>

But you have the jar file somewhere on the host machine don't you? Mount that location into the Docker container via the `-v` option to `docker run`.

---

<div class="post-metadata">

**Author:** ![AJ\_NOURI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aj_nouri/32/29741_2.png) [@AJ\_NOURI](https://discuss.elastic.co/u/AJ_NOURI)\
**Post date:** [April 23, 2018, 12:48pm UTC](https://discuss.elastic.co/t/logstash-container-cannot-find-jar-driver-library-file-for-jdbc-input-plugin/129054/3 "2018-04-23T12:48:00Z")

</div>

Thanks @magnusbaeck,  
Indeed, I downloaded the file separately and mounted the directory.  
Now it works!

---

<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:** [May 21, 2018, 12:48pm UTC](https://discuss.elastic.co/t/logstash-container-cannot-find-jar-driver-library-file-for-jdbc-input-plugin/129054/4 "2018-05-21T12:48:03Z")

</div>

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