一.安装:类似ES学习(二)Linux搭建方式进行搭建
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.2.zip
sha1sum elasticsearch-5.2.2.zip
unzip elasticsearch-5.2.2.zip
cd elasticsearch-5.2.2/
二.启动:bin/elasticsearch -d
启动期间遇到了几个问题进行分享:
三.排错:一共四个问题(以下问题解决借要切换到root账户):
问题1:max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536] elasticsearch
原因:系统允许 Elasticsearch 打开的最大文件数需要修改成65536
解决:vi /etc/security/limits.conf
添加内容:
* soft nofile 65536 * hard nofile 131072 * soft nproc 2048 * hard nproc 4096
问题2:max number of threads [1024] for user [judy2] likely too low, increase to at least [2048]
原因:允许最大进程数修该成2048
解决:vi /etc/security/limits.d/90-nproc.conf
修改如下内容:
* soft nproc 1024
#修改为
* soft nproc 2048
问题3:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
原因:一个进程可以拥有的虚拟内存区域的数量。
解决:可零时提高vm.max_map_count的大小
命令:sysctl -w vm.max_map_count=262144
问题4:bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
解决:config/elasticsearch.yml添加:transport.host: localhost
启动,成功~