ElasticSearch:尝试启动elasticsearch时出现“错误:elasticsearch意外退出”

c90pui9n  于 2022-11-02  发布在  ElasticSearch
关注(0)|答案(1)|浏览(1026)

我尝试从elasticsearch目录运行.bin/elasticsearch来启动elasticsearch。但是,我一直收到错误消息ERROR: Elasticsearch exited unexpectedly。对此有什么可能的解决方案?
我使用下面的命令从linux上的归档文件安装了Elasticsearch。

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.3-linux-x86_64.tar.gz

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.3-linux-x86_64.tar.gz.sha512

shasum -a 512 -c elasticsearch-8.3.3-linux-x86_64.tar.gz.sha512 

tar -xzf elasticsearch-8.3.3-linux-x86_64.tar.gz

cd elasticsearch-8.3.3/

下面是我从elasticsearch.log文件中获得的更多错误日志

[2022-08-17T00:32:36,417][ERROR][o.e.b.Bootstrap          ] [blessed-Lenovo-ideapad-110-15IBR] Exception
java.lang.RuntimeException: can not run elasticsearch as root
    at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:99) ~[elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224) [elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) [elasticsearch-8.3.3.jar:?]
[2022-08-17T00:32:36,855][ERROR][o.e.b.Elasticsearch      ] [blessed-Lenovo-ideapad-110-15IBR] fatal exception while booting Elasticsearch
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:228) [elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) [elasticsearch-8.3.3.jar:?]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
    at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:99) ~[elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-8.3.3.jar:?]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224) ~[elasticsearch-8.3.3.jar:?]
    ... 1 more
8i9zcol2

8i9zcol21#

能不能查

ls -ltd elasticsearch-8.3.3

并在此处给出输出(关于目录权限)。

相关问题