# Elastic search won't start after fresh install on Debian

**URL:** <https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517>\
**Category:** Elasticsearch\
**Created:** [June 12, 2016, 3:14am UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517 "2016-06-12T03:14:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![red888](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@red888](https://discuss.elastic.co/u/red888)\
**Post date:** [June 12, 2016, 3:14am UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517/1 "2016-06-12T03:14:27Z")

</div>

$ uname -a  
3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86\_64 GNU/Linux

I installed Java like to /opt/jdk/jdk1.8.0\_91

Then installed elastic:  
Imported key  
`wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -`

Added repo  
`echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list`

Installed  
`apt-get install elasticsearch`

config:  
All I changed in the config was to edit /etc/elasticsearch/elasticsearch.yml and specify:  
`network.host localhost`

Then  
`sudo /bin/systemctl daemon-reload`  
`sudo systemctl start elasticsearch`

This is what I see:

```
sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled)
   Active: failed (Result: exit-code) since Sat 2016-06-11 23:05:19 EDT; 3s ago
     Docs: http://www.elastic.co
  Process: 5526 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID_DIR}/elasticsearch.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
  Process: 5523 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 5526 (code=exited, status=1/FAILURE)

Jun 11 23:05:19 Rick elasticsearch[5526]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Jun 11 23:05:19 Rick elasticsearch[5526]: at <<<guice>>>
Jun 11 23:05:19 Rick elasticsearch[5526]: at org.elasticsearch.node.Node.<init>(Node.java:213)
Jun 11 23:05:19 Rick elasticsearch[5526]: at org.elasticsearch.node.Node.<init>(Node.java:140)
Jun 11 23:05:19 Rick elasticsearch[5526]: at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
Jun 11 23:05:19 Rick elasticsearch[5526]: at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
Jun 11 23:05:19 Rick elasticsearch[5526]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
Jun 11 23:05:19 Rick elasticsearch[5526]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Jun 11 23:05:19 Rick systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jun 11 23:05:19 Rick systemd[1]: Unit elasticsearch.service entered failed state.

```

No logs in /var/logs/elasticsearch

Running the program directly I see this:

`sudo -u elasticsearch /usr/share/elasticsearch/bin/elasticsearch -d -p /var/run/elasticsearch.pid --default.config=/etc/elasticsearch/elasticsearch.yml --default.path.home=/usr/share/elasticsearch --default.path.logs=/var/log/elasticsearch --default.path.data=/var/lib/elasticsearch --default.path.work=/tmp/elasticsearch --default.path.conf=/etc/elasticsearch`

`[2016-06-11 23:09:00,329][INFO][bootstrap] es.default.config is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed.`

This is a fresh install of the latest elasticsearch. I never configured es.default.config nor can I find it or links to it in any elastic dirs.

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 12, 2016, 7:46am UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517/2 "2016-06-12T07:46:04Z")

</div>

Hi, I got this error too when I updated my Elasticsearch, apparently it was several causes, one of which was that the elasticsearch user couldn't write to a certain directory (if you google your error you'll end up on some blog where a simple solution is explained, I can't really recall which I'm afraid). Further more, probably not useful in your usecase, but the plug-in I installed was installed for 2.3.2, after my update it went to 2.3.3...which failed my ES from booting without any error message.

---

<div class="post-metadata">

**Author:** ![red888](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@red888](https://discuss.elastic.co/u/red888)\
**Post date:** [June 12, 2016, 3:40pm UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517/3 "2016-06-12T15:40:19Z")

</div>

Hmm I wasn't able to find anything about this being due to a permissions error.

Also, this isn't an upgrade this is a completely fresh install.

---

<div class="post-metadata">

**Author:** ![red888](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@red888](https://discuss.elastic.co/u/red888)\
**Post date:** [June 12, 2016, 4:19pm UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517/4 "2016-06-12T16:19:38Z")

</div>

OK your right this was mostly a simple permissions issue.

The elastic user had access to /var/lib/elasticsearch/ and /var/log/elasticsearch/ but for some reason didn't have access to /etc/elasticsearch

After fixing that I got this error in the elastic log:  
[2016-06-12 12:02:09,464][ERROR][bootstrap] Guice Exception: java.lang.IllegalArgumentException: script.disable\_dynamic is not a supported setting, replace with fine-grained script settings.  
Dynamic scripts can be enabled for all languages and all operations by replacing `script.disable_dynamic: false` with `script.inline: on` and `script.indexed: on` in elasticsearch.yml

So doing exactly what the error suggests (replacing `script.disable_dynamic: false` with `script.inline: on` and `script.indexed: on` in elasticsearch.yml) solved my issues.

---

<div class="post-metadata">

**Author:** ![coreation](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coreation/32/10165_2.png) [@coreation](https://discuss.elastic.co/u/coreation)\
**Post date:** [June 13, 2016, 8:50am UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517/5 "2016-06-13T08:50:50Z")

</div>

Still a weird error isn't it? I find the errors that ES gives very unhelpful, if it gives any error at all.

---

<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:44pm UTC](https://discuss.elastic.co/t/elastic-search-wont-start-after-fresh-install-on-debian/52517/6 "2017-07-05T22:44:23Z")

</div>


