elasticsearch 安装中可能遇到的问题

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

3.[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
  [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]


    vim /etc/security/limits.conf
    添加下面配置
    * soft nofile 65536
    * hard nofile 131071
    * soft nproc 65536
    * hard nproc 65536


    vim /etc/sysctl.conf

    添加下面配置:

    vm.max_map_count=655360


    如果后启动的节点加入不到集群中,是因为复制elasticsearch整个文件夹到另一个虚拟机了,此时删除elasticsearch文件夹下的打他里的内容即可

原文地址:https://www.cnblogs.com/yuanbaodong/p/8242129.html