centos下root运行Elasticsearch异常问题解决
程序员文章站
2022-06-28 23:46:23
在centos 6.5 上运行elasticsearch 2.3,异常如下:
exception in thread "main" java.lang...
在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。
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!