ElasticSearch的安装过程中遇到的问题
程序员文章站
2024-02-01 18:57:28
...
ElasticSearch的安装过程中遇到的问题
1. 问题一
-
问题描述
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
-
解决办法:
-
修改jvm配置
-
vim config/jvm.options
-Xms512m -Xmx512m
-
2. 问题二
-
问题描述
max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]
-
解决办法
-
vim /etc/security/limits.d/90-nproc.conf
* soft nproc 2048
-
3. 问题三
-
问题描述
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
-
解决办法
-
vim /etc/sysctl.conf
-
末尾添加:
vm.max_map_count=262144
-
4. 问题四
-
问题描述
max file descriptors [65535] for elasticsearch process likely too low, increase to at least [65536]
-
解决办法
-
vim /etc/sysctl.conf
-
末尾添加:
fs.file-max=655350
-
保存,执行sysctl -p
-
vim /etc/security/limits.conf
-
修改:
* soft nofile 655350 * hard nofile 655350
-
5. 问题五
-
问题描述
ERROR: bootstrap checks failed system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
-
解决办法
-
vim config/elasticsearch.yml
-
在Memory下修改(添加):
bootstrap.memory_lock: false bootstrap.system_call_filter: false
-
需要注意的是:该配置,若不是注释掉的配置,配置的最前面必须加一个空格,冒号后面也要加一个空格。
-
转载于:https://my.oschina.net/shadowolf/blog/1542655