elasticsearch不能以root用户启动的解决方法

栏目: 码农笔记 · 发布时间: 8年前

内容简介:elasticsearch不能以root用户启动的解决方法

在 root 用户下启动 elasticsearch,报如下错误:

[root@localhost elasticsearch-5.2.2]# ./bin/elasticsearch
//部分错误如下
[2017-03-15T22:16:22,913][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root

报错明确指出,不能以root用户启动

这种情况下,需要先改变目录的用户权限,然后再以普通用户启动

[root@localhost local]# chown -R essearch elasticsearch-5.2.2
[root@localhost local]# su - essearch
[hncl@localhost elasticsearch-5.2.2]$ ./bin/elasticsearch

这样就可以正常启动了。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Clean Code

Clean Code

Robert C. Martin / Prentice Hall / 2008-8-11 / USD 49.99

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code......一起来看看 《Clean Code》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

随机密码生成器
随机密码生成器

多种字符组合密码