# Installing Elasticsearch Error

**URL:** <https://discuss.elastic.co/t/installing-elasticsearch-error/342976>\
**Category:** Elasticsearch\
**Created:** [September 13, 2023, 4:14pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-error/342976 "2023-09-13T16:14:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![heureux](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@heureux](https://discuss.elastic.co/u/heureux)\
**Post date:** [September 13, 2023, 4:14pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-error/342976/1 "2023-09-13T16:14:24Z")

</div>

Hi,

By executing the command: ./bin/elasticsearch I have this error:  
\<  
[ERROR][o.e.b.Elasticsearch] [wazuh-server] fatal exception while booting Elasticsearchjava.lang.RuntimeException: can not run elasticsearch as root  
at org.elasticsearch.server@8.10.0/org.elasticsearch.bootstrap.Elasticsearch.initializeNatives(Elasticsearch.java:280)  
at org.elasticsearch.server@8.10.0/org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:166)  
at org.elasticsearch.server@8.10.0/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:71)

See logs for more details.

ERROR: Elasticsearch did not exit normally - check the logs at /home/wazuh-user/elasticsearch-8.10.0/logs/elasticsearch.log

ERROR: Elasticsearch exited unexpectedly, with exit code 1. \>

Any help  
Thanks

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 13, 2023, 4:20pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-error/342976/2 "2023-09-13T16:20:04Z")

</div>

> Elasticsearchjava.lang.RuntimeException: **can not run elasticsearch as root**

The error is pretty clear, you are trying to start Elasticsearch as the root user, it does not work.

You need to run it as a service, it will use the `elasticsearch` user.

---

<div class="post-metadata">

**Author:** ![heureux](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@heureux](https://discuss.elastic.co/u/heureux)\
**Post date:** [September 14, 2023, 6:56am UTC](https://discuss.elastic.co/t/installing-elasticsearch-error/342976/3 "2023-09-14T06:56:38Z")

</div>

Hi Leandro,

Thanks for your response.

I used these commands:

wget [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.10.0-linux-x86\_64.tar.gz](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.10.0-linux-x86_64.tar.gz)

wget [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.10.0-linux-x86\_64.tar.gz.sha512](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.10.0-linux-x86_64.tar.gz.sha512)

shasum -a 512 -c elasticsearch-8.10.0-linux-x86\_64.tar.gz.sha512

tar -xzf elasticsearch-8.10.0-linux-x86\_64.tar.gz

cd elasticsearch-8.10.0/

./bin/elasticsearch

Could you give me more information.

BR

---

<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:** [October 12, 2023, 6:56am UTC](https://discuss.elastic.co/t/installing-elasticsearch-error/342976/4 "2023-10-12T06:56:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
