How to troubleshoot CentOS root run Elasticsearch exception

Source: Internet
Author: User
Tags centos

How to troubleshoot CentOS root run Elasticsearch exception

Running Elasticsearch 2.3 on CentOS 6.5, the exception is as follows:

?

1 2 3 4 5 6 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.

The exception is described as not being able to run Elasticsearch with root permissions. The solution is to add parameters at run time:

?

1 Bin/elasticsearch-des.insecure.allow.root=true

or modify the Bin/elasticsearch, plus the es_java_opts attribute:

?

1 Es_java_opts= "-des.insecure.allow.root=true"

Restart Elasticsearch after saving.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.