# Logstash Configuarion file issue

**URL:** <https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346>\
**Category:** Logstash\
**Created:** [February 7, 2020, 12:23pm UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346 "2020-02-07T12:23:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 7, 2020, 12:23pm UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/1 "2020-02-07T12:23:40Z")

</div>

I have connect elk stack with mysql configuration file showing error . My configuration file is following

input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/db\_ublfunds\_cc"  
jdbc\_user =\> "abcd"  
jdbc\_password =\> "1234"  
jdbc\_driver\_library =\> "/etc/logstash/mysql-connector-java-8.0.16.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
statement =\> "SELECT \* from details"  
}  
}  
output {  
elasticsearch {  
hosts =\> "[http://192.168.216.92:9200](http://192.168.216.92:9200)"  
index =\> "details"  
document\_type =\> "details"  
}  
stdout{  
codec =\> rubydebug  
}  
}

---

<div class="post-metadata">

**Author:** ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)\
**Post date:** [February 7, 2020, 2:03pm UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/2 "2020-02-07T14:03:42Z")

</div>

Hi @Syed.Ubaid:

1. What error do you observe?
2. Could you provide the debug logs for Logstash? You can run Logstash from the [command line](https://www.elastic.co/guide/en/logstash/7.5/running-logstash-command-line.html#command-line-flags):

- `bin/logstash --debug -f <PATH_TO_CONFIG_FILE>`

Thank you.

---

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 7, 2020, 2:07pm UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/3 "2020-02-07T14:07:00Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/e/cef969daa9b1b5ecbd8e6f11c638cab579c42466.png) this is the error

---

<div class="post-metadata">

**Author:** ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)\
**Post date:** [February 7, 2020, 2:38pm UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/4 "2020-02-07T14:38:03Z")

</div>

@Syed.Ubaid -

1. It seems that you are facing the same issue as what was reported in this [Discuss topic](https://discuss.elastic.co/t/logstash-error-no-implicit-conversion-of-integer-into-string/192901).

[The last run metadata file](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#_state) will store the `sql_last_value` and It is updated accordingly after subsequent queries are run.

It seems that Logstash cannot parse the value stored in this file. It could be because you have been running Logstash with different SQL statements and the `sql_last_value` type keeps on changing?

1. What you could try:

- use the [clean\_run](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-clean_run) option to ignore the previous state. or,
- use `use_column_value` option along with the `tracking_column` option. or,
- delete the [last run metadata file](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-last_run_metadata_path) but I believe this would only be a temporary solution.

I hope that helps.

---

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 10, 2020, 4:35am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/5 "2020-02-10T04:35:30Z")

</div>

If you see my config file i am not running scheduler so why use of sql\_last\_value i am running simple select statement

---

<div class="post-metadata">

**Author:** ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)\
**Post date:** [February 10, 2020, 4:42am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/6 "2020-02-10T04:42:00Z")

</div>

@Syed.Ubaid - This is not related to the scheduler - it is related to the plugin [state](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#_state).

---

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 10, 2020, 4:42am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/7 "2020-02-10T04:42:38Z")

</div>

ok i will revert you back after checking your conditions

---

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 10, 2020, 4:52am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/8 "2020-02-10T04:52:46Z")

</div>

i am using view for multiple select statements now can you please tell me what value i use for column\_value and tracking\_column

---

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 10, 2020, 4:53am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/9 "2020-02-10T04:53:30Z")

</div>

if i use\_column\_value = true what would be the tracking column

---

<div class="post-metadata">

**Author:** ![Syed.Ubaid](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Syed.Ubaid](https://discuss.elastic.co/u/Syed.Ubaid)\
**Post date:** [February 10, 2020, 5:06am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/10 "2020-02-10T05:06:44Z")

</div>

i use tracking column value=true and also use tracking column id data is parse in logstash but when i see in kibana only 1 record is showing

---

<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:** [March 9, 2020, 5:06am UTC](https://discuss.elastic.co/t/logstash-configuarion-file-issue/218346/11 "2020-03-09T05:06:48Z")

</div>

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