# No log4j2 configuration file found: logging only errors to the console

**URL:** https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295
**Category:** Logstash
**Created:** [September 21, 2017, 9:02am UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295 "2017-09-21T09:02:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![karan\_singh](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@karan\_singh](https://discuss.elastic.co/u/karan_singh)
#### Post date: [September 21, 2017, 9:02am UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295/1 "2017-09-21T09:02:12Z")

</div>

Elasticsearch and kibana are running perfectly fine but whenver i try to run my logstash configuration file it throws me the following error:  
C:\Users\Dell -\Desktop\ELK\logstash-5.5.2\bin\>logstash -f logstash-simple.conf ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. An unexpected error occurred! :error =\> bad URI(is not URI?): file:///C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/config/log4j2.properties, :backtrace =\> ["C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/uri/common.rb:176:in `split'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/uri/common.rb:210:in`parse'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/uri/common.rb:747:in `parse'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/uri/common.rb:994:in`URI'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/logstash-core/lib/logstash/logging/logger.rb:77:in `initialize'", "org/jruby/ext/thread/Mutex.java:149:in`synchronize'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/logstash-core/lib/logstash/logging/logger.rb:75:in `initialize'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/logstash-core/lib/logstash/runner.rb:229:in`execute'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/logstash-core/lib/logstash/runner.rb:209:in`run'", "C:/Users/Dell -/Desktop/ELK/logstash-5.5.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "C:\\Users\\Dell -\\Desktop\\ELK\\logstash-5.5.2\\lib\\bootstrap\\environment.rb:71:in`(root)'"]

My configuration file is:  
input {  
file{  
path =\> "C:/Users/Dell -/Desktop/ELK/nessus\_sample.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}  
filter{  
csv {  
seperator =\> ","

```
	colums => ["Plugin ID", "CVE", "CVS", "Risk", "Host", "Protocol", "Port", "Name", "Synopsis", "Description", "Solution", "See also", "Plugin output"]
    }

mutate {convert => ["Plugin ID", "integer"]}
mutate {convert => ["Port", "integer"]}	        

```

}  
output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "nessus\_sample"  
document\_type =\> "Scanned\_ip"  
}  
stdout { }  
}

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 21, 2017, 9:34am UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295/2 "2017-09-21T09:34:49Z")

</div>

It may be the space in the path, try it without it?

---

<div class="post-metadata">

### Author: ![karan\_singh](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@karan\_singh](https://discuss.elastic.co/u/karan_singh)
#### Post date: [September 21, 2017, 9:44am UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295/3 "2017-09-21T09:44:37Z")

</div>

Tried without the space it's still throwing the same error.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 21, 2017, 9:23pm UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295/4 "2017-09-21T21:23:09Z")

</div>

It's this;

> [@karan\_singh](#):
>
> hosts =\> "localhost:9200"

The format is incorrect as per;

> **[Elasticsearch output plugin | Logstash Reference \[5.6\] | Elastic](https://www.elastic.co/guide/en/logstash/5.6/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts)**

---

<div class="post-metadata">

### Author: ![karan\_singh](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@karan\_singh](https://discuss.elastic.co/u/karan_singh)
#### Post date: [September 25, 2017, 6:16am UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295/5 "2017-09-25T06:16:03Z")

</div>

Still the same error.

---

<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: [October 23, 2017, 6:16am UTC](https://discuss.elastic.co/t/no-log4j2-configuration-file-found-logging-only-errors-to-the-console/101295/6 "2017-10-23T06:16:12Z")

</div>

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