# Issues installing / starting ES 2.1.0 when installed from a repository

**URL:** https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320
**Category:** Elasticsearch
**Created:** [December 3, 2015, 8:31pm UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320 "2015-12-03T20:31:58Z")
**Posts on this page:** 7
**Page:** 1

<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: [December 3, 2015, 8:31pm UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/1 "2015-12-03T20:31:59Z")

</div>

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](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/ .

---

<div class="post-metadata">

### Author: ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)
#### Post date: [December 6, 2015, 4:30am UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/2 "2015-12-06T04:30:50Z")

</div>

I am able to solve this issue by uncomment CONF\_DIR, LOG\_DIR in my case.

---

<div class="post-metadata">

### Author: ![Shrawan\_Bhagwat](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Shrawan\_Bhagwat](https://discuss.elastic.co/u/Shrawan_Bhagwat)
#### Post date: [March 7, 2016, 8:27am UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/3 "2016-03-07T08:27:36Z")

</div>

Hi,

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

Regards,  
Shrawan

---

<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: [March 7, 2016, 9:04am UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/4 "2016-03-07T09:04:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![NicholasHerriot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicholasherriot/32/11833_2.png) [@NicholasHerriot](https://discuss.elastic.co/u/NicholasHerriot)
#### Post date: [September 9, 2016, 6:08pm UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/5 "2016-09-09T18:08:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![NicholasHerriot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicholasherriot/32/11833_2.png) [@NicholasHerriot](https://discuss.elastic.co/u/NicholasHerriot)
#### Post date: [September 9, 2016, 6:22pm UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/6 "2016-09-09T18:22:52Z")

</div>

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!!!! ........... ☹

Kind regards, Nicholas.

---

<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:21pm UTC](https://discuss.elastic.co/t/issues-installing-starting-es-2-1-0-when-installed-from-a-repository/36320/7 "2017-07-05T22:21:30Z")

</div>


