max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
编辑/etc/security/limits.conf,追加以下内容;* soft nofile 65536 * hard nofile 65536此文件修改后需要重新登录用户,才会生效
登录后使用ulimit -S -n和ulimit -H -n查看the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
原因分析
看提示可知:缺少默认配置,至少需要配置discovery.seed_hosts/discovery.seed_providers/cluster.initial_master_nodes中的一个参数.
discovery.seed_hosts: 集群主机列表
discovery.seed_providers: 基于配置文件配置集群主机列表
cluster.initial_master_nodes: 启动时初始化的参与选主的node,生产环境必填处理办法
修改配置文件,添加参数即可vim config/elasticsearch.yml #添加配置 discovery.seed_hosts: ["127.0.0.1"] cluster.initial_master_nodes: ["node-1"]max number of threads [3767] for user [xxx] is too low, increase to at least [4096]# 脚本 #!/bin/bash echo "* soft nproc 2048" >> /etc/security/limits.conf echo "* hard nproc 4096" >> /etc/security/limits.conf echo "* soft nofile 65536" >> /etc/security/limits.conf echo "* hard nofile 65536" >> /etc/security/limits.conf echo "* soft memlock unlimited" >> /etc/security/limits.conf echo "* hard memlock unlimited" >> /etc/security/limits.conf echo "vm.max_map_count = 262144" >> /etc/sysctl.conf sysctl -p ulimit -l unlimitedinitial heap size [268435456] not equal to maximum heap size [536870912];
去/config/jvm.options中修改一下配置即可
Xms和Xmx的大小要一样