1.unable to load JNA native support library, native methods will be disabled.
产生异常原因:linux是32位,而elasticsearch为64位
elasticsearch安装目录下(我的目录是usr/java/elasticsearch)的lib目录中删除默认的jna-4.5.1.jar。在windows重新下载一个jna-4.5.1.jar并上传到elasticsearch的lib目录中就ok了。
jna-4.5.1.jar链接:https://pan.baidu.com/s/1L8RnCi_-C-Fu7FKWIdjUBg
提取码:e5cv
2.max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536](文件权限不足)
首先用root用户登录。
然后修改配置文件:vim /etc/security/limits.conf
添加下面的内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 4096
* hard nproc 4096
- max number of threads [1024] for user [leyou] is too low, increase to at least [4096](线程数不够)
继续修改配置:vim /etc/security/limits.d/90-nproc.conf
把soft nproc 1024改为soft nproc 4096
4.max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144](进程虚拟内存)
vm.max_map_count:限制一个进程可以拥有的VMA(虚拟内存区域)的数量
修改配置文件:vim /etc/sysctl.conf
添加下面内容:vm.max_map_count=655360
然后执行命令:sysctl -p
5.JVM is using the client VM [Java HotSpot™ Client VM] but should be using a server VM for the best performance
JVM正在使用客户机VM [Java HotSpot™客户机VM],但是为了获得最佳性能,应该使用服务器VM解决方法是在jdk安装目录下:usr\java\jdk-1.8.0.05\jre\lib\i386\jvm.cfg(我的目录)这个文件,修改如下配置:
把-server KNOWN放在-client IF_SERVER_CLASS -server前边。
6.system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
修改elasticsearch.yml文件,在最下面添加如下配置:bootstrap.system_call_filter: false