記錄Linux安裝ElasticSearch遇到的一些問題與解決
環境和版本
Centos 6 x86 ElasticSearch-6.3.2 jdk8
問題與解決
1.外網無法訪問elasticsearch
修改檔案elasticsearch.yml,新增如下配置
network.host: XX.XX.XX.X //本機ip
http.port: 9200
之後可能會遇到的問題
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
切換到root使用者 修改/etc/security/limits.conf,在檔案後新增如下配置
* hard nofile 65536
* soft nofile 65536
2.提示虛擬記憶體太小,最大檔案描述程序太小
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
依然使用root使用者 修改/etc/sysctl.conf 新增如下配置
vm.max_map_count=2621441
儲存後執行sudo sysctl -p /etc/sysctl.conf 使之生效
3.jvm HotSpot client VM 與 server VM
JVM is using the client VM [Java HotSpot(TM) Client VM] but should be using a server VM for the best performance
修改檔案
JAVA_HOME\jre\lib\i386\jvm.cfg
-server KNOWN //原來在第二行 -client IF_SERVER_CLASS -server -minimal KNOWN
4.system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
Centos6不支援SecComp
修改檔案elasticsearch.yml
bootstrap.memory_lock: false
bootstrap.system_call_filter: false