# Logstash 5.5 unable to locate config file in windows 10

**URL:** <https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655>\
**Category:** Logstash\
**Created:** [January 23, 2018, 11:25am UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655 "2018-01-23T11:25:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manisha\_2018](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@manisha\_2018](https://discuss.elastic.co/u/manisha_2018)\
**Post date:** [January 23, 2018, 11:25am UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655/1 "2018-01-23T11:25:03Z")

</div>

Hi,  
I am using logstash-5.5.0 in Windows 10.  
Its unable to find config File which I have kept in logstash folder itself.  
Below is the error which I am getting when I do "logstash -f logstash.conf":

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.  
Sending Logstash's logs to C:/logstash-5.5.0/logs which is now configured via log4j2.properties  
[2018-01-23T16:54:13,613][INFO][logstash.agent] No config files found in path {:path=\>"C:/logstash-5.5.0/bin/logstash.conf"}  
[2018-01-23T16:54:13,627][ERROR][logstash.agent] failed to fetch pipeline configuration {:message=\>"No config files found: logstash.conf. Can you make sure this path is a logstash config file?"}  
2018-01-23 16:54:13,721 Api Webserver ERROR No log4j2 configuration file found. Using default configuration: logging only errors to the console.

---

<div class="post-metadata">

**Author:** ![paz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paz/32/28003_2.png) [@paz](https://discuss.elastic.co/u/paz)\
**Post date:** [January 23, 2018, 2:56pm UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655/2 "2018-01-23T14:56:13Z")

</div>

You aren't invoking Logstash from the _/logstash_ directory it seems, you're in _/logstash/bin_ directory and it's expected to not find the config file if it's under the _/logstash_ directory.

Either use absolute paths for your logstash config (the full path), or move it inside the _/bin_ folder (although the latter is not really a nice solution).

---

<div class="post-metadata">

**Author:** ![lauea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lauea/32/26743_2.png) [@lauea](https://discuss.elastic.co/u/lauea)\
**Post date:** [January 23, 2018, 4:21pm UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655/3 "2018-01-23T16:21:11Z")

</div>

Yes.

@manisha_2018 You should make sure the path of config. BTW, you can add you logstash binary file path to environment variable so that you can use `logstash` command everywhere. and append `-c <Full path of your logstash.conf>`

```bash
# Added logstash bin folder into your environment variable, only below way can you run what you run before.
eason:logstash xy920$ pwd
/Users/eason/development/logstash
eason:logstash eason$ ls
bin logstash.conf
eason:logstash eason$ logstash -c logstash.conf

```

---

<div class="post-metadata">

**Author:** ![manisha\_2018](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@manisha\_2018](https://discuss.elastic.co/u/manisha_2018)\
**Post date:** [February 1, 2018, 9:53am UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655/4 "2018-02-01T09:53:28Z")

</div>

I was able to get through this. I just pasted my config file in config folder & its extension was still .txt which I got to know through folder options .After changing that LOgstash is now able to find config file .  
So here is the new problem : I am trying to connect to sql DB through Logstash and show Output in Elastic search and for that my config file is :  
"input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/test"  
# The user we wish to execute our statement as  
jdbc\_user =\> "**_"  
jdbc\_password =\> "_**\*\*\*"  
# The path to our downloaded jdbc driver  
jdbc\_driver\_library =\> "C:\logstash-5.5.0\mysql-connector-java-5.1.45"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
# our query  
statement =\> "SELECT \* FROM example"  
}  
}  
output {  
stdout { codec =\> json\_lines }  
elasticsearch {  
"hosts" =\> "localhost:9200"  
"index" =\> "test-migrate"  
"document\_type" =\> "data"  
}  
}"

---

<div class="post-metadata">

**Author:** ![manisha\_2018](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@manisha\_2018](https://discuss.elastic.co/u/manisha_2018)\
**Post date:** [February 1, 2018, 9:54am UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655/5 "2018-02-01T09:54:21Z")

</div>

And I am getting this output which I am unable to understand.  
"ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.  
Sending Logstash's logs to C:/logstash-5.5.0/logs which is now configured via log4j2.properties  
[2018-02-01T15:10:29,382][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>[], :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
[2018-02-01T15:10:29,395][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2018-02-01T15:10:29,851][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>#Java::JavaNet::URI:0x3ba0ab33}  
[2018-02-01T15:10:29,854][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
[2018-02-01T15:10:29,998][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"\_all"=\>{"enabled"=\>true, "omit\_norms"=\>true}, "dynamic\_templates"=\>[{"message\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"string", "index"=\>"analyzed", "omit\_norms"=\>true, "fielddata"=\>{"format"=\>"disabled"}}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"string", "index"=\>"analyzed", "omit\_norms"=\>true, "fielddata"=\>{"format"=\>"disabled"}, "fields"=\>{"raw"=\>{"type"=\>"string", "index"=\>"not\_analyzed", "doc\_values"=\>true, "ignore\_above"=\>256}}}}}, {"float\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"float", "mapping"=\>{"type"=\>"float", "doc\_values"=\>true}}}, {"double\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"double", "mapping"=\>{"type"=\>"double", "doc\_values"=\>true}}}, {"byte\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"byte", "mapping"=\>{"type"=\>"byte", "doc\_values"=\>true}}}, {"short\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"short", "mapping"=\>{"type"=\>"short", "doc\_values"=\>true}}}, {"integer\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"integer", "mapping"=\>{"type"=\>"integer", "doc\_values"=\>true}}}, {"long\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"long", "mapping"=\>{"type"=\>"long", "doc\_values"=\>true}}}, {"date\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"date", "mapping"=\>{"type"=\>"date", "doc\_values"=\>true}}}, {"geo\_point\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"geo\_point", "mapping"=\>{"type"=\>"geo\_point", "doc\_values"=\>true}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date", "doc\_values"=\>true}, "@version"=\>{"type"=\>"string", "index"=\>"not\_analyzed", "doc\_values"=\>true}, "geoip"=\>{"type"=\>"object", "dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip", "doc\_values"=\>true}, "location"=\>{"type"=\>"geo\_point", "doc\_values"=\>true}, "latitude"=\>{"type"=\>"float", "doc\_values"=\>true}, "longitude"=\>{"type"=\>"float", "doc\_values"=\>true}}}}}}}}  
[2018-02-01T15:10:30,061][INFO][logstash.outputs.elasticsearch] Installing elasticsearch template to \_template/logstash  
[2018-02-01T15:10:30,892][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>[#Java::JavaNet::URI:0x1f4c39ef]}  
[2018-02-01T15:10:30,905][INFO][logstash.pipeline] Starting pipeline {"id"=\>"main", "pipeline.workers"=\>2, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>5, "pipeline.max\_inflight"=\>250}  
[2018-02-01T15:10:33,577][INFO][logstash.pipeline] Pipeline main started  
LoadError: no such file to load -- C:/logstash-5.5.0/mysql-connector-java-5.1.45  
require at org/jruby/RubyKernel.java:1040  
require at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65  
load\_drivers at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.1/lib/logstash/plugin\_mixins/jdbc.rb:134  
each at org/jruby/RubyArray.java:1613  
load\_drivers at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.1/lib/logstash/plugin\_mixins/jdbc.rb:132  
open\_jdbc\_connection at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.1/lib/logstash/plugin\_mixins/jdbc.rb:146  
execute\_statement at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.1/lib/logstash/plugin\_mixins/jdbc.rb:217  
execute\_query at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.1/lib/logstash/inputs/jdbc.rb:272  
run at C:/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.1/lib/logstash/inputs/jdbc.rb:256  
inputworker at C:/logstash-5.5.0/logstash-core/lib/logstash/pipeline.rb:456  
start\_input at C:/logstash-5.5.0/logstash-core/lib/logstash/pipeline.rb:449"

---

<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 1, 2018, 9:54am UTC](https://discuss.elastic.co/t/logstash-5-5-unable-to-locate-config-file-in-windows-10/116655/6 "2018-03-01T09:54:25Z")

</div>

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