ElasticSearch
- 简介
- 错误解决
- unab to install syscall filter
- max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
- max number of threads [1024] for user [nc] is too low, increase to at least [4096]
- max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
- JVM is using the client VM [Java HotSpot™ Client VM] but should be using a server VM for the best performance
- unable to load JNA native support library, native methods will be disabled
- failed to obtain node locks, tried
简介
ElasticSearch就是一种比数据库高级的搜索技术(全文检索技术)。
Elastic官网:https://www.elastic.co/cn/
有如下几个特点:
1.分布式
2.restful风格
3.实时搜索
错误解决
unab to install syscall filter
linux版本过低,禁用elasticsearch插件
elasticsearch.yml 添加
bootstrap.system_call_filter: false
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
每个进程最大同时打开文件数太小修改配置文件
vim /etc/security/limits.conf
添加
* soft nofile 65536
* hard nofile 131072
* soft nproc 4096
* hard nproc 4096
max number of threads [1024] for user [nc] is too low, increase to at least [4096]
线程数不够
vim /etc/security/limits.d/90-nproc.conf
修改
* soft nproc 1024
1024改为4096
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
JVM is using the client VM [Java HotSpot™ Client VM] but should be using a server VM for the best performance
这里jvm推荐使用server这样性能更高但是启动会变慢
解决办法:
修改文件
JAVA_HOME\jre\lib\i386\jvm.cfg
-server KNOWN //原来在第二行
-client IF_SERVER_CLASS -server
-minimal KNOWN
unable to load JNA native support library, native methods will be disabled
直接删除或备份Elasticsearch-a.b.c/lib目录下面的jna文件:
mv jna-4.4.0.jar jna-4.4.0.jar.bak
这里可能版本会不一样但是下载下来的话并不影响
在lib目录下:
wget http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar
failed to obtain node locks, tried
删除data下的note目录即可解决