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(LogConfigurator.java:158)
at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:103)
at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:204)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:258)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:225)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
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)
... 4 more
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 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(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.createDirectory(UnixFileSystemProvider.java:384)
at java.nio.file.Files.createDirectory(Files.java:674)
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
at java.nio.file.Files.createDirectories(Files.java:767)
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:250)
at org.elasticsearch.bootstrap.Security.addPath(Security.java:227)
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:194)
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:184)
at org.elasticsearch.bootstrap.Security.configure(Security.java:105)
at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:196)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
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.

Hi,

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

Regards,
Shrawan

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.

i.e.
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:
    /var/lib

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.