当前位置: 移动技术网 > 网络运营>服务器>Linux > centos下root运行Elasticsearch异常问题解决

centos下root运行Elasticsearch异常问题解决

2019年06月03日  | 移动技术网网络运营  | 我要评论

 在centos 6.5 上运行elasticsearch 2.3,异常如下:

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:270)
    at org.elasticsearch.bootstrap.elasticsearch.main(elasticsearch.java:35)
refer to the log for complete error details.

异常描述为不能以root权限运行elasticsearch.解决办法是运行时加上参数:

bin/elasticsearch -des.insecure.allow.root=true

或者修改bin/elasticsearch,加上es_java_opts属性:

es_java_opts="-des.insecure.allow.root=true"

保存之后重启elasticsearch。

 感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网