Installing Elasticsearch Error


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(
at org.elasticsearch.server@8.10.0/org.elasticsearch.bootstrap.Elasticsearch.initPhase2(
at org.elasticsearch.server@8.10.0/org.elasticsearch.bootstrap.Elasticsearch.main(

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

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.

Hi Leandro,

Thanks for your response.

I used these commands:



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/


Could you give me more information.


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