Installing Elasticsearch Error

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

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:

wget 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

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

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