Caused by: java.lang.RuntimeException: can not run elasticsearch as root
解决方法:
创建elsearch用户组及elsearch用户
[root@xxx elasticsearch-5.5.1]# groupadd elsearch
[root@xxx elasticsearch-5.5.1]# useradd elsearch -g elsearch -p elasticsearch
给用户及组赋/usr/local/java/elasticsearch-5.5.1目录权限,目录改成你安装的目录
[root@xxx elasticsearch-5.5.1]# chown -R elsearch:elsearch /usr/local/java/elasticsearch-5.5.1
切换到elsearch用户再启动
[root@xxx elasticsearch-5.5.1]# su elsearch
再启动
[elsearch@xxx elasticsearch-5.5.1]$ ./bin/elasticsearch