vim elasticsearch.yml 将原来network修改为以下配置: network.host: 0.0.0.0
原始配置
修改后配置
重启启动ES服务
1
./elasticsearch
重新启动es出现如下错误
1 2 3 4
ERROR: [3] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] [2]: max number of threads [3802] for user [es] is too low, increase to at least [4096] [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决错误[1] 使用root用户修改系统配置
1 2 3 4 5
vim /etc/security/limits.conf 在最后面追加下面内容 * soft nofile 65536 * hard nofile 65536 * soft nproc 4096 * hard nproc 4096
登录重新在检测配置是否生效
1 2 3 4
ulimit -Hn ulimit -Sn ulimit -Hu ulimit -Su
解决错误[2] 使用root用户修改系统配置
1 2
vim /etc/security/limits.d/20-nproc.conf 启动ES用户名 soft nproc 4096