1、can not run elasticsearch as root
切换到非root用户
2、main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
改变elasticsearch文件夹所有者到当前用户
sudo chown -R noroot:noroot elasticsearch
3、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
sudo vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sudo sysctl -p
4、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
sudo vi /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
sudo vi /etc/pam.d/common-session
添加 session required pam_limits.so
sudo vi /etc/pam.d/common-session-noninteractive
添加 session required pam_limits.so
如果安装到虚拟机中无法访问服务,可以修改elasticsearch.yml 中host地址