# Elasticsearch start failing

**URL:** <https://discuss.elastic.co/t/elasticsearch-start-failing/47330>\
**Category:** Elasticsearch\
**Created:** [April 14, 2016, 12:55am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330 "2016-04-14T00:55:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mag\_Carl](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Mag\_Carl](https://discuss.elastic.co/u/Mag_Carl)\
**Post date:** [April 14, 2016, 12:55am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/1 "2016-04-14T00:55:22Z")

</div>

Elasticsearch doeas not start and gives below message

log4j:WARN No appenders could be found for logger (bootstrap).  
log4j:WARN Please initialize the log4j system properly.  
log4j:WARN See [http://logging.apache.org/log4j/1.2/faq.html#noconfig](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.

Please help

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2016, 5:56am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/2 "2016-04-14T05:56:33Z")

</div>

What did you install? How?

The message you have might indicate that your logging.yml file does not exist or is incorrect...

---

<div class="post-metadata">

**Author:** ![Mag\_Carl](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Mag\_Carl](https://discuss.elastic.co/u/Mag_Carl)\
**Post date:** [April 14, 2016, 9:11am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/3 "2016-04-14T09:11:14Z")

</div>

I have installed elasticsearch 2.3.0  
below is the logging.yml located at /etc/elasticsearch

```auto
# you can override this using by setting a system property, for example -Des.log ger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
  # log action execution errors for easier debugging
  action: DEBUG

  # deprecation logging, turn to DEBUG to see them
  deprecation: INFO, deprecation_log_file

  # reduce the logging for aws, too much is logged under the default INFO
  com.amazonaws: WARN
  # aws will try to do some sketchy JMX stuff, but its not needed.
  com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR
  com.amazonaws.metrics.AwsSdkMetrics: ERROR

  org.apache.http: INFO

  # gateway
  #gateway: DEBUG
  #index.gateway: DEBUG

  # peer shard recovery
  #indices.recovery: DEBUG

  # discovery
  #discovery: TRACE

  index.search.slowlog: TRACE, index_search_slow_log_file
  index.indexing.slowlog: TRACE, index_indexing_slow_log_file

additivity:
  index.search.slowlog: false
  index.indexing.slowlog: false
  deprecation: false

appender:
  console:
    type: console
    layout:
      type: consolePattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.10000m%n"

  # Use the following log4j-extras RollingFileAppender to enable gzip compressio n of log files.
  # For more information see https://logging.apache.org/log4j/extras/apidocs/org /apache/log4j/rolling/RollingFileAppender.html
  #file:
    #type: extrasRollingFile
    #file: ${path.logs}/${cluster.name}.log
    #rollingPolicy: timeBased
    #rollingPolicy.FileNamePattern: ${path.logs}/${cluster.name}.log.%d{yyyy-MM- dd}.gz
    #layout:
      #type: pattern
      #conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  deprecation_log_file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}_deprecation.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  index_search_slow_log_file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}_index_search_slowlog.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  index_indexing_slow_log_file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}_index_indexing_slowlog.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

```

---

<div class="post-metadata">

**Author:** ![crickes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crickes/32/18009_2.png) [@crickes](https://discuss.elastic.co/u/crickes)\
**Post date:** [April 14, 2016, 9:25am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/4 "2016-04-14T09:25:08Z")

</div>

Did you install is as a service using APT or YUM, or just by downloading the files directly? And how did you try to start Elastic, again as a service, or just by running the binary file directly?

Reason I ask is because the when installed as a service, but then starting manually, you need to tell Elastic where the path is like this:

```
sudo -u elasticsearch bin/elasticsearch -Des.path.conf=/etc/elasticsearch

```

Otherwise, you get the error about not being able to file the logging.yml file.

The actual reason Elastic won't start is probably very different, but until it can log the error correctly, you're shooting in the dark.

---

<div class="post-metadata">

**Author:** ![Mag\_Carl](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Mag\_Carl](https://discuss.elastic.co/u/Mag_Carl)\
**Post date:** [April 14, 2016, 9:27am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/5 "2016-04-14T09:27:50Z")

</div>

I used APT

---

<div class="post-metadata">

**Author:** ![crickes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crickes/32/18009_2.png) [@crickes](https://discuss.elastic.co/u/crickes)\
**Post date:** [April 14, 2016, 9:29am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/6 "2016-04-14T09:29:32Z")

</div>

Read my edit above..

---

<div class="post-metadata">

**Author:** ![Mag\_Carl](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Mag\_Carl](https://discuss.elastic.co/u/Mag_Carl)\
**Post date:** [April 14, 2016, 2:55pm UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/7 "2016-04-14T14:55:07Z")

</div>

Sorry for my basic qs as Im a novice in this field.  
I used apt to install .  
Ran sudo -u elasticsearch bin/elasticsearch -Des.path.conf=/etc/elasticsearch

and got below...Not sure where to look for log  
Exception in thread "main" ElasticsearchException[Failed to load logging configu ration]; nested: AccessDeniedException[/etc/elasticsearch];  
Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84 )  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemPr ovider.java:427)  
at java.nio.file.Files.newDirectoryStream(Files.java:457)  
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300)  
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)  
at java.nio.file.Files.walkFileTree(Files.java:2662)  
at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig( LogConfigurator.java:142)  
at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogC onfigurator.java:103)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:243)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)  
Refer to the log for complete error details.

---

<div class="post-metadata">

**Author:** ![crickes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crickes/32/18009_2.png) [@crickes](https://discuss.elastic.co/u/crickes)\
**Post date:** [April 14, 2016, 8:32pm UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/8 "2016-04-14T20:32:09Z")

</div>

> [@Mag\_Carl](#):
>
> AccessDeniedException[/etc/elasticsearch];Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch

I'd check your permissions on this path to make sure the 'elasticsearch' user has access to it.

---

<div class="post-metadata">

**Author:** ![Mag\_Carl](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Mag\_Carl](https://discuss.elastic.co/u/Mag_Carl)\
**Post date:** [April 15, 2016, 1:44am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/9 "2016-04-15T01:44:12Z")

</div>

I m running this from root and /etc/elasticsearch is assigned to root/root

---

<div class="post-metadata">

**Author:** ![crickes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crickes/32/18009_2.png) [@crickes](https://discuss.elastic.co/u/crickes)\
**Post date:** [April 15, 2016, 6:56am UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/10 "2016-04-15T06:56:36Z")

</div>

When Elasticsearch runs as a service, it will run as user 'elasticsearch'.

the command:

> sudo -u elasticsearch bin/elasticsearch -Des.path.conf=/etc/elasticsearch

is starting Elasticsearch as the 'elasticsearch' user so it highlights any access issues the process would have when it runs as 'elasticsearch'.

---

<div class="post-metadata">

**Author:** ![Mag\_Carl](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Mag\_Carl](https://discuss.elastic.co/u/Mag_Carl)\
**Post date:** [April 16, 2016, 3:17pm UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/11 "2016-04-16T15:17:27Z")

</div>

Thanks noted..For now i was able to get it it working with below command

./elasticsearch -Des.insecure.allow.root=true

will try your suggestion too

---

<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:** [July 5, 2017, 10:58pm UTC](https://discuss.elastic.co/t/elasticsearch-start-failing/47330/12 "2017-07-05T22:58:48Z")

</div>


