# ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console

**URL:** <https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672>\
**Category:** Logstash\
**Created:** [August 29, 2017, 10:47am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672 "2017-08-29T10:47:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [August 29, 2017, 10:47am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/1 "2017-08-29T10:47:51Z")

</div>

Logstash version : 5.5.2  
Elasticsearch version:5.5.2

When I use the command line(bin/logstash -f /etc/logstash/hello\_es.conf), it throws a such error:

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.  
Sending Logstash's logs to /home/wangyufeng/logstash-5.5.2/logs which is now configured via log4j2.properties  
[2017-08-29T18:39:44,022][ERROR][logstash.agent] Cannot create pipeline {:reason=\>"Expected one of #, input, filter, output at line 1, column 1 (byte 1) after "}

Anyone can tell me how to resolve it?

---

<div class="post-metadata">

**Author:** ![immavalls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/immavalls/32/146501_2.png) [@immavalls](https://discuss.elastic.co/u/immavalls)\
**Post date:** [August 29, 2017, 1:05pm UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/2 "2017-08-29T13:05:41Z")

</div>

It seems there's a problem with your logstash.conf file, hello\_es.conf. Probably malformed. Can you include content in your post?

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [August 30, 2017, 6:11am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/3 "2017-08-30T06:11:00Z")

</div>

Thanks. the content of the hello\_es.conf is:  
input {  
stdin {  
type =\> "human"  
}  
}

output {  
stdout {  
codec =\> rubydebug  
}

elasticsearch {  
host =\> "10.62.179.32"  
port =\> 9200  
}  
}  
And it is located in/home/wangyfueng/logstash-5.5.2/cconfig/, when I run the command: bin/logstash -f /home/wangyfueng/logstash-5.5.2/cconfig/hello\_es.conf, it throws this error:  
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.  
Sending Logstash's logs to /home/wangyufeng/logstash-5.5.2/logs which is now configured via log4j2.properties  
[2017-08-30T14:10:35,377][ERROR][logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch  
[2017-08-30T14:10:35,380][ERROR][logstash.outputs.elasticsearch] Unknown setting 'port' for elasticsearch  
[2017-08-30T14:10:35,386][ERROR][logstash.agent] Cannot create pipeline {:reason=\>"Something is wrong with your configuration."}

---

<div class="post-metadata">

**Author:** ![immavalls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/immavalls/32/146501_2.png) [@immavalls](https://discuss.elastic.co/u/immavalls)\
**Post date:** [August 30, 2017, 6:22am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/4 "2017-08-30T06:22:02Z")

</div>

The correct sintax is, as you can see in [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts), is:

```
elasticsearch {
  hosts => ["10.62.179.32:9200"]
}
```

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [August 30, 2017, 7:39am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/5 "2017-08-30T07:39:13Z")

</div>

Thanks, I have corrected the hello\_es.conf:

input {  
stdin {  
type =\> "human"  
}  
}

output {  
stdout {  
codec =\> rubydebug  
}

elasticsearch {  
host =\> ["10.62.179.32: 9200"]  
}  
}  
but it still has the error:  
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.  
Sending Logstash's logs to /home/wangyufeng/logstash-5.5.2/logs which is now configured via log4j2.properties  
[2017-08-30T15:30:32,430][ERROR][logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch  
[2017-08-30T15:30:32,440][ERROR][logstash.agent] Cannot create pipeline {:reason=\>"Something is wrong with your configuration."}

Do I need to modify the path of logs in log4j2.properties? But I don't konw which line is the logs' path.

---

<div class="post-metadata">

**Author:** ![immavalls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/immavalls/32/146501_2.png) [@immavalls](https://discuss.elastic.co/u/immavalls)\
**Post date:** [August 30, 2017, 7:39am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/6 "2017-08-30T07:39:57Z")

</div>

host is hosts. You're still missing the s.

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [September 6, 2017, 2:38am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/7 "2017-09-06T02:38:13Z")

</div>

Ok, thank you.

---

<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 4, 2017, 2:38am UTC](https://discuss.elastic.co/t/error-statuslogger-no-log4j2-configuration-file-found-using-default-configuration-logging-only-errors-to-the-console/98672/8 "2017-10-04T02:38:20Z")

</div>

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