don't run elasticsearch as root. 的问题

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.
  • 直接在运行是添加参数
    bin/elasticsearch -Des.insecure.allow.root=true
  • 或者修改 bin/elasticsearch,加上ES_JAVA_OPTS属性:
    ES_JAVA_OPTS="-Des.insecure.allow.root=true"
don't run elasticsearch as root. 的问题
Share this