elasticsearch 安装启动错误

系统版本

uname -a
Linux Lserv-54 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release 
CentOS release 6.5 (Final)

java版本

java -version
openjdk version "1.8.0_65-debug"
OpenJDK Runtime Environment (build 1.8.0_65-debug-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01-debug, mixed mode)

使用root启动elasticsearch错误如下:
elasticsearch 版本 2.1.0

bin/elasticsearch
Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
    at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.

这个是什么原因呢

阅读 41.5k
6 个回答

don't run elasticsearch as root.

启动之后, 出现警告

[2015-11-27 18:02:35,276][WARN ][bootstrap                ] unable to install syscall filter: prctl(PR_GET_NO_NEW_PRIVS): Invalid argument

这个什么意思呢, 那的问题呢, curl -X GET http://localhost:9200/ 是可以返回结果的

不能用root账户,要用别的账户启动

新手上路,请多包涵

elasticserch 不能以root 账号启动,需要自己添加用户启动,起始你看给出的提示就可以知道问题出在哪里了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进