记录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

 

你可能感兴趣的:(服务器相关)