Caused by: java.lang.RuntimeException: can not run elasticsearch as root
作者:互联网
爆报错截图如下:此错误是在centos7中启动elasticsearch6.0是报的错,原因报错中也已经写明是因为elasticsearch不能用root用户启动,解决方法如下:1.需要新建个用户组与用户:
groupadd elsearch
useradd elsearch -g elsearch
passwd elsearch
2.给用户赋予权限
cd /opt
chown -R elsearch:elsearch elasticsearch-6.0.1
3.再次切换用户重新启动:
su elsearch
cd /optelasticsearch-6.0.1/bin
./elasticsearch
标签:lang,run,RuntimeException,用户,cd,elasticsearch,6.0,报错,elsearch 来源: https://blog.csdn.net/weixin_44629054/article/details/120986824