如何在Linux机器中以root用户身份运行Elasticsearch 2.1.1 [英] How to run Elasticsearch 2.1.1 as root user in Linux machine

查看:590
本文介绍了如何在Linux机器中以root用户身份运行Elasticsearch 2.1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我尝试执行Elasticsearch时,我正在尝试在我的Linux机器上运行Elasticsearch 2.1.1得到以下错误,

 线程main中的异常java.lang.RuntimeException:不要以root身份运行弹性搜索。 
在org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)
在org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)
在org.elasticsearch .bootstrap.Bootstrap.init(Bootstrap.java:285)
在org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
请参阅日志以获取完整的错误详细信息。

我引用了互联网上的一些建议,他们提到要以不同的用户身份运行它。我的方案是以root用户身份运行。



提前感谢

解决方案

基于以下代码段看起来像您应该能够通过启用属性
es.insecure.allow.root



示例:

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


I am trying to run Elasticsearch 2.1.1 in my Linux machine which I am the root user of it.

When I tried to execute the Elasticsearch.I am getting the following error,

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.

I referred some suggestion available in internet, they mentioned to run it as different user. My scenario is to run as root user only. How to overcome this problem without running as different user.

Thanks in advance

解决方案

Based of the following code-snippet looks like you should be able to achieve this by enabling property es.insecure.allow.root

Example :

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

这篇关于如何在Linux机器中以root用户身份运行Elasticsearch 2.1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆