# Log4j2 configuration file not found

**URL:** https://discuss.elastic.co/t/log4j2-configuration-file-not-found/141771
**Category:** Elasticsearch
**Created:** [July 26, 2018, 12:56pm UTC](https://discuss.elastic.co/t/log4j2-configuration-file-not-found/141771 "2018-07-26T12:56:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dikshash](https://avatars.discourse-cdn.com/v4/letter/d/ba9def/32.png) [@dikshash](https://discuss.elastic.co/u/dikshash)
#### Post date: [July 26, 2018, 12:56pm UTC](https://discuss.elastic.co/t/log4j2-configuration-file-not-found/141771/1 "2018-07-26T12:56:08Z")

</div>

Hi all I am new to elasticsearch and have to perform some basic operation using elasticsearch and when i run elasticsearch from command prompt I am getting following mentioned error.  
Kindly help.

```
Exception in thread "main" 2018-07-26 18:20:35,145 main ERROR No log4j2 configur
    ation file found. Using default configuration: logging only errors to the consol
    e. Set system property 'log4j2.debug' to show Log4j2 internal initialization log
    ging.
    SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: Par
    singException[Failed to parse object: expecting token of type [START_OBJECT] but
     found [VALUE_STRING]];
            at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Set
    tings.java:1192)
            at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Setti
    ngs.java:1165)
            at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(In
    ternalSettingsPreparer.java:100)
            at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAw
    areCommand.java:95)
            at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwar
    eCommand.java:86)
            at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1
    24)
            at org.elasticsearch.cli.Command.main(Command.java:90)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)

            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)

    Caused by: ParsingException[Failed to parse object: expecting token of type [STA
    RT_OBJECT] but found [VALUE_STRING]]
            at org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedT
    oken(XContentParserUtils.java:78)
            at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java
    :672)
            at org.elasticsearch.common.settings.Settings.access$500(Settings.java:8
    4)
            at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Set
    tings.java:1188)
            ... 8 more
```

---

<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: [August 23, 2018, 12:56pm UTC](https://discuss.elastic.co/t/log4j2-configuration-file-not-found/141771/2 "2018-08-23T12:56:14Z")

</div>

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