1、can not run elasticsearch as root
切换到非root用户
groupadd elasticsearch
useradd -g elasticsearch elasticsearch
passwd elasticsearch
2.main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
改变elasticsearch文件夹所有者到当前用户
sudo chown -R elasticsearch:elasticsearch elasticsearch