# Logstash throws config error, even though 'input' is listed as the first parameter on config file

**URL:** <https://discuss.elastic.co/t/logstash-throws-config-error-even-though-input-is-listed-as-the-first-parameter-on-config-file/214154>\
**Category:** Logstash\
**Created:** [January 8, 2020, 5:12am UTC](https://discuss.elastic.co/t/logstash-throws-config-error-even-though-input-is-listed-as-the-first-parameter-on-config-file/214154 "2020-01-08T05:12:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sg\_shreyas](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sg\_shreyas](https://discuss.elastic.co/u/sg_shreyas)\
**Post date:** [January 8, 2020, 5:12am UTC](https://discuss.elastic.co/t/logstash-throws-config-error-even-though-input-is-listed-as-the-first-parameter-on-config-file/214154/1 "2020-01-08T05:12:57Z")

</div>

I am getting config error while launching Logstash. I am using 7.5.1 version.  
Same config file worked earlier. I had to setup ELK stash on another VM since older VM was decommissioned, and I am facing this error here.

**I'm instantiating logstash using -**

> logstash-7.5.1\bin\logstash -f logstash-config.conf

# config file

```
#config file

input{
jdbc{
jdbc_driver_library=>"C:\software\ojdbc7.jar"
jdbc_driver_class=>"Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string=>"jdbc:oracle:thin:@<host>:1528:TSTIM"
jdbc_user=>"UName"
jdbc_password=>"PWD"
statement=>"SELECT * from TABLE where run_id > 4500"
}
}

output{
elasticsearch{
hosts=>"http://localhost:9200"
index=>"run_id"
document_type=>"TABLEname"
document_id=>"run_id"
user=>"elastic"
password=>"changeme"
}
stdout{
codec=>rubydebug
}
}

```

**Error:**

> ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d5bdf0f16cdaf6b988fb61ba3c4a361509340207.png)

```auto
C:\software>logstash-7.5.1\bin\logstash -f logstash-config.conf
Thread.exclusive is deprecated, use Thread::Mutex
Sending Logstash logs to C:/software/logstash-7.5.1/logs which is now configured via log4j2.properties
[2020-01-08T05:04:33,207][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-01-08T05:04:33,426][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"7.5.1"}
[2020-01-08T05:04:34,869][ERROR][logstash.agent] Failed to execute action 
{:action=>LogStash::PipelineAction::Create/pipeline_id:main,
:exception=>"LogStash::ConfigurationError",
:message=>"Expected one of [\t\r\n], "#", "input", "filter", "output" at line 1, column 1 (byte 1)", 
:backtrace=>[
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'",
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:49:in compile_graph'",
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'",
"org/jruby/RubyArray.java:2584:in map'",
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", 
"org/logstash/execution/AbstractPipelineExt.java:156:in initialize'",
"org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", 
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/java_pipeline.rb:27:in initialize'", 
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", 
"C:/software/logstash-7.5.1/logstash-core/lib/logstash/agent.rb:326:in block in converge_state'"
]}
[2020-01-08T05:04:35,510][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
[2020-01-08T05:04:40,325][INFO][logstash.runner] Logstash shut down.

```

---

<div class="post-metadata">

**Author:** ![sg\_shreyas](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sg\_shreyas](https://discuss.elastic.co/u/sg_shreyas)\
**Post date:** [January 8, 2020, 8:59am UTC](https://discuss.elastic.co/t/logstash-throws-config-error-even-though-input-is-listed-as-the-first-parameter-on-config-file/214154/2 "2020-01-08T08:59:59Z")

</div>

My bad. The config file had some bad characters. I just had to cleanup.  
Handtyping the same content onto another file worked.

---

<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:** [February 5, 2020, 9:12am UTC](https://discuss.elastic.co/t/logstash-throws-config-error-even-though-input-is-listed-as-the-first-parameter-on-config-file/214154/3 "2020-02-05T09:12:56Z")

</div>

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