日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

ElasticSearch 7.X系列之:Centos7中常見啟動報錯以及解決方法

作者:超超超超子 更新時間: 2022-05-20 編程語言

Elasticsearch啟動報錯解決方法
1、機器內剩余內存較少,會啟動失敗,并且有類似如下報錯:
Java HotSpot(TM) 64-Bit Server VM warning:INFO: os::commit_memory(0x000000008a660000, 1973026816, 0) failed; error='Cannot allocate memory' (errno=12)
這是因為es的jvm參數-Xmx和-Xms默認都為2G
修改config下的jvm.option文件
# vi elasticsearch/elasticsearch-6.1.0/config/jvm.opstions

-Xms2g
-Xmx2g
改為
-Xms1g
-Xmx1g
或更小
-Xms512M
-Xmx512M
再次啟動即可
2、啟動的時候出現:
1、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...
解決方法:在elasticsearch.yml中配置bootstrap.system_call_filter為false,注意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
3、ERROR: bootstrap checks failed max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536] max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]
解決方法:切換到root用戶,編輯limits.conf 添加類似如下內容
#vi /etc/security/limits.conf
添加如下內容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

4、max number of threads [1024] for user [lish] likely too low, increase to at least [2048]
解決方法:切換到root用戶,進入limits.d目錄下修改配置文件。
#vi /etc/security/limits.d/90-nproc.conf
修改如下內容:
* soft nproc 1024
修改為
* soft nproc 2048
5、max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
解決方法:切換到root用戶修改配置sysctl.conf
#vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并執行命令:
#sysctl -p
然后,再啟動elasticsearch,即可啟動成功。


報錯[seci-*****] creating index,cause[api],templates[],shards[5]/[1],mappings[]
[seci-*****/********]create_create_mapping
解決方法:
#vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 131072
這個文件的最后兩行,把上面這個配置覆蓋了。刪掉最后兩行即可
正確文件:

若有收獲,就點個贊吧

原文鏈接:https://blog.csdn.net/g5703129/article/details/124816435

欄目分類
最近更新