網(wǎng)站首頁(yè) 編程語(yǔ)言 正文
ElasticSearch 7.X系列之:Centos7中常見(jiàn)啟動(dòng)報(bào)錯(cuò)以及解決方法
作者:超超超超子 更新時(shí)間: 2022-05-20 編程語(yǔ)言Elasticsearch啟動(dòng)報(bào)錯(cuò)解決方法
1、機(jī)器內(nèi)剩余內(nèi)存較少,會(huì)啟動(dòng)失敗,并且有類似如下報(bào)錯(cuò):
Java HotSpot(TM) 64-Bit Server VM warning:INFO: os::commit_memory(0x000000008a660000, 1973026816, 0) failed; error='Cannot allocate memory' (errno=12)
這是因?yàn)閑s的jvm參數(shù)-Xmx和-Xms默認(rèn)都為2G
修改config下的jvm.option文件
# vi elasticsearch/elasticsearch-6.1.0/config/jvm.opstions
將
-Xms2g
-Xmx2g
改為
-Xms1g
-Xmx1g
或更小
-Xms512M
-Xmx512M
再次啟動(dòng)即可
2、啟動(dòng)的時(shí)候出現(xiàn):
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 添加類似如下內(nèi)容
#vi /etc/security/limits.conf
添加如下內(nèi)容:
* 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用戶,進(jìn)入limits.d目錄下修改配置文件。
#vi /etc/security/limits.d/90-nproc.conf
修改如下內(nèi)容:
* 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
并執(zhí)行命令:
#sysctl -p
然后,再啟動(dòng)elasticsearch,即可啟動(dòng)成功。
報(bào)錯(cuò)[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
這個(gè)文件的最后兩行,把上面這個(gè)配置覆蓋了。刪掉最后兩行即可
正確文件:
若有收獲,就點(diǎn)個(gè)贊吧
原文鏈接:https://blog.csdn.net/g5703129/article/details/124816435
相關(guān)推薦
- 2022-06-13 云計(jì)算openstack框架分類及發(fā)展階段概述_OpenStack
- 2022-06-29 python人工智能tensorflow常用激活函數(shù)Activation?Functions_pyt
- 2022-05-20 Idea搭建一個(gè)簡(jiǎn)單的SpringBoot項(xiàng)目
- 2022-03-27 C++中兩種字符串定義方式和區(qū)別介紹_C 語(yǔ)言
- 2022-07-13 Android Canvas - save() & restore()
- 2022-09-17 C++中String類型的逆序方式_C 語(yǔ)言
- 2022-09-10 Python自動(dòng)打印被調(diào)用函數(shù)變量名及對(duì)應(yīng)值?_python
- 2022-06-16 Go基礎(chǔ)教程系列之?dāng)?shù)據(jù)類型詳細(xì)說(shuō)明_Golang
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過(guò)濾器
- Spring Security概述快速入門(mén)
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支