Issues installing / starting ES 2.1.0 when installed from a repository

Is anyone else having issues getting a fresh install of 2.1.0 when installed repository? It is as though all the paths are screwed up. I get this when I try to start it:

ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/usr/share/elasticsearch/config];
at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(
at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(
at org.elasticsearch.bootstrap.Bootstrap.setupLogging(
at org.elasticsearch.bootstrap.Bootstrap.init(
at org.elasticsearch.bootstrap.Elasticsearch.main(
Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
at sun.nio.fs.UnixException.translateToIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(
at sun.nio.fs.UnixFileSystemProvider.readAttributes(
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(
at java.nio.file.Files.readAttributes(
at java.nio.file.FileTreeWalker.getAttributes(
at java.nio.file.FileTreeWalker.visit(
at java.nio.file.FileTreeWalker.walk(
at java.nio.file.Files.walkFileTree(
at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(
... 4 more
log4j:WARN No appenders could be found for logger (bootstrap).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See for more info.
Exception in thread "main" java.lang.IllegalStateException: Unable to access 'path.conf' (/usr/share/elasticsearch/config)
Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config
at sun.nio.fs.UnixException.translateToIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixFileSystemProvider.createDirectory(
at java.nio.file.Files.createDirectory(
at java.nio.file.Files.createAndCheckIsDirectory(
at java.nio.file.Files.createDirectories(
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(
at org.elasticsearch.bootstrap.Security.addPath(
at org.elasticsearch.bootstrap.Security.addFilePermissions(
at org.elasticsearch.bootstrap.Security.createPermissions(
at org.elasticsearch.bootstrap.Security.configure(
at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(
at org.elasticsearch.bootstrap.Bootstrap.setup(
at org.elasticsearch.bootstrap.Bootstrap.init(
at org.elasticsearch.bootstrap.Elasticsearch.main(
Refer to the log for complete error details.

If I download the tar/gz files and run from there it seems to start ok, but I need this to install using apt-get and run as a service.

it's looking for a config file at [/usr/share/elasticsearch/config] but when installed from a repo, this should be /etc/elasticsearch/ .

1 Like

I am able to solve this issue by uncomment CONF_DIR, LOG_DIR in my case.


Can you plz share the command that you are using to run ES?


You are able to tell elasticsearch where its config files are from the command line. In my case the command is:
sudo -u elasticsearch bin/elasticsearch -Des.path.conf=/etc/elasticsearch

Hi all,

first post for ES.
Been happily running 2.x via apt fro many months now. Just used synaptic to pull new updates for my system and now I get this same error.

Exception in thread "main" ElasticsearchException[Failed to load logging configuration];
Likely root cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config

Anyone got a simple 'instruction' on what has gone wrong and why?

It would be nice to NOT get a reply like:
"I changed config_foo_bar_xx1=zz2"

and more like:
"In director /foo/bar/elasticsearc/
I updated file fooBarElastic.config so that paramgers config_foo_bar_xx1=zz2"

And also - is it a recommendation to NOT upgrade things as they come along?
Thank God we did not run an update on our live server!!! Not Good!

Kind regards, Nicholas.

1 Like

To anyone who had the problem I just described above.
I have no idea why installing my updates failed and I'm guessing that directories or files have changed position while services were still active and running during the update - but no evidence just a hunch.

Easiest way I got round it was:

  1. Launch synaptic package manager:
    /> sudo synaptic

  2. Select ElasticSearch and Kibana for complete removal.

  3. This will fail to do a complete clean up so go into dir:

Remove dir elasticsearc dir

/> sudo rm -r elasticsearch/

  1. Reinstall Elastic search with synaptic.

  2. Test it works by running as a service:
    /> sudo service elasticsearch start

  • Starting Elasticsearch Server

/> sudo service elasticsearch status

  • elasticsearch is running
  1. Check your logs are OK
    /> /var/log/elasticsearch $ tail -f -n200 elasticsearch.log

Please Mr Elastic stop messing up your releases! Otherwise I'm using Whoosh!!!! ........... :frowning:

Kind regards, Nicholas.