您现在的位置是:网站首页> 编程资料编程资料
如何解决centos下root运行Elasticsearch异常_RedHat/Centos_操作系统_
2023-03-24
771人已围观
简介 如何解决centos下root运行Elasticsearch异常_RedHat/Centos_操作系统_
在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。
以上内容就是小编为大家带来的关于解决centos下root运行Elasticsearch异常的方法了;希望对大家会有帮助!
相关内容
- CentOS Ubuntu Debian三个linux的异同对比_RedHat/Centos_操作系统_
- centos7如何添加开机启动服务/脚本_RedHat/Centos_操作系统_
- CentOS设置开机启动服务及自动联网的方法_RedHat/Centos_操作系统_
- CentOS7上如何添加Swap交换空间_RedHat/Centos_操作系统_
- win下无法ping通VM虚拟机CentOS系统的解决方法_RedHat/Centos_操作系统_
- CentOS下如何查询系统信息?_RedHat/Centos_操作系统_
- CentOS系统如何启动流程?CentOS系统启动流程的图文教程_RedHat/Centos_操作系统_
- Centos文件搜索命令的讲解_RedHat/Centos_操作系统_
- 如何更改centos7的默认启动为命令界面?_RedHat/Centos_操作系统_
- centos下如何使用fdisk扩展分区容量大小_RedHat/Centos_操作系统_
