# Logstash\[2.4.0\] JDBC input plugin not working

**URL:** <https://discuss.elastic.co/t/logstash-2-4-0-jdbc-input-plugin-not-working/65213>\
**Category:** Logstash\
**Created:** [November 7, 2016, 12:10pm UTC](https://discuss.elastic.co/t/logstash-2-4-0-jdbc-input-plugin-not-working/65213 "2016-11-07T12:10:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasi\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sasi_kumar/32/12988_2.png) [@Sasi\_Kumar](https://discuss.elastic.co/u/Sasi_Kumar)\
**Post date:** [November 7, 2016, 12:10pm UTC](https://discuss.elastic.co/t/logstash-2-4-0-jdbc-input-plugin-not-working/65213/1 "2016-11-07T12:10:28Z")

</div>

Hi all,  
[https://www.elastic.co/blog/logstash-jdbc-input-plugin](https://www.elastic.co/blog/logstash-jdbc-input-plugin)  
Am new to logstash, not able to inject the data into elasticsearch from logstash.  
Elastic was up and running in the port number 9200. Ex: 172.16.0.19:9200  
Downloaded logstash as tar.  
**Version Details**  
ElasticSearch - 2.4.1  
Logstash - 2.4.0  
**Installed JDBC Input plugin**  
`[logstash]$ bin/logstash-plugin install logstash-input-jdbc`  
**Command used for importing data into ES.**  
`[logstash]$ bin/logstash --debug -l /home/user/logstash.log -f /home/user/logstash.txt`

**_logstash.txt_**

```
input {
jdbc {
       jdbc_connection_string => "jdbc:mysql://172.17.3.9:3306/test"
       jdbc_user => "root"
       jdbc_password => "root"
       jdbc_validate_connection => true
       jdbc_driver_library => "/home/user/mysql-connector-java-5.1.36.jar"
       jdbc_driver_class => "com.mysql.jdbc.Driver"
       statement => "SELECT * FROM test.test"
     }
}
output {
    elasticsearch{
        protocol => http
        index => "default__product"
        document_type => "test"
        document_id => "%{id}"
        hosts => ["172.16.0.19:9200"]
    }
}

```

**_logstash.log_**

[Link for Log file](https://anotepad.com/notes/wq45tp)

---

<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:** [November 7, 2016, 12:17pm UTC](https://discuss.elastic.co/t/logstash-2-4-0-jdbc-input-plugin-not-working/65213/2 "2016-11-07T12:17:44Z")

</div>

This is what your log says:

> Unknown setting 'protocol' for elasticsearch

Remove that setting.

---

<div class="post-metadata">

**Author:** ![Sasi\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sasi_kumar/32/12988_2.png) [@Sasi\_Kumar](https://discuss.elastic.co/u/Sasi_Kumar)\
**Post date:** [November 7, 2016, 12:41pm UTC](https://discuss.elastic.co/t/logstash-2-4-0-jdbc-input-plugin-not-working/65213/3 "2016-11-07T12:41:21Z")

</div>

It works thanks 🙂  
Breaking my head for whole day!!!!!!!!

**_Working Config File_**

```
input {
jdbc {
       jdbc_connection_string => "jdbc:mysql://172.17.3.9:3306/test"
       jdbc_user => "root"
       jdbc_password => "root"
       jdbc_validate_connection => true
       jdbc_driver_library => "/home/user/mysql-connector-java-5.1.36.jar"
       jdbc_driver_class => "com.mysql.jdbc.Driver"
       statement => "SELECT * FROM test.test"
     }
}
output {
    elasticsearch{
        index => "default__product"
        document_type => "test"
        document_id => "%{id}"
        hosts => ["172.16.0.19:9200"]
    }
}
```

---

<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:** [December 5, 2016, 12:41pm UTC](https://discuss.elastic.co/t/logstash-2-4-0-jdbc-input-plugin-not-working/65213/4 "2016-12-05T12:41:20Z")

</div>

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