# Logstash jdbc config throwing error

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-config-throwing-error/317974>\
**Category:** Logstash\
**Tags:** jdbc\
**Created:** [November 2, 2022, 10:57am UTC](https://discuss.elastic.co/t/logstash-jdbc-config-throwing-error/317974 "2022-11-02T10:57:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashiqab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashiqab/32/103144_2.png) [@ashiqab](https://discuss.elastic.co/u/ashiqab)\
**Post date:** [November 2, 2022, 10:57am UTC](https://discuss.elastic.co/t/logstash-jdbc-config-throwing-error/317974/1 "2022-11-02T10:57:54Z")

</div>

Hello,

I am facing the error below when trying to execute logstash jdbc config file:

[ERROR] 2022-11-02 11:52:26.435 [Converge PipelineAction::Create] agent - Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of [\t\r\n], "#", [A-Za-z0-9\_-], '"', "'", "}" at line 3, column 5 (byte 24) after input {\n jdbc {\n ", :backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:210:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:48:in `initialize'", "org/jruby/RubyClass.java:911:in `new'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:50:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:381:in `block in converge\_state'"]}

Here is my config file:

> input {  
> jdbc {  
> jdbc\_driver\_library =\> "/etc/logstash/conf.d/db2jcc.jar"  
> jdbc\_driver\_class =\> "com.ibm.db2.jcc.DB2Driver"  
> jdbc\_connection\_string =\> "jdbc:db2://10.177.37.145:25010/DD1"  
> jdbc\_user =\> "db2usr"  
> jdbc\_password =\> "xxxxxx"  
> schedule =\> "\* \* \* \* \*"  
> statement =\> "SELECT TIME\_STAMP AS DB\_READ\_TIME\_STAMP, SCRIPT\_NAME AS DB\_READ\_SCRIPT\_NAME, SCRIPT\_STATUS AS DB\_READ\_SCRIPT\_STATUS from SCHEMA.TABNAME"  
> }  
> }  
> output {  
> elasticsearch {  
> hosts =\> "[http://localhost:9200](http://localhost:9200)"  
> index =\> "dbinfolog"  
> user =\> elastic  
> password =\> xxxxxxxxxx  
> }  
> }

Could you please point out anything I may be missing on this config file?

Thanks in advance,  
Ashiq Aboo Backer

---

<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:** [November 30, 2022, 10:58am UTC](https://discuss.elastic.co/t/logstash-jdbc-config-throwing-error/317974/2 "2022-11-30T10:58:29Z")

</div>

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