es7.13.2集群安装失败报错处理

ERROR: 2 bootstrap checks failed.You must address the points described in the following 2 lines before starting Elasticsearch.

bootstrap checks failed 1 of 2: memory locking requested for elasticsearch process but memory is not locked

bootstrap checks failed 1 of 2: max virtual memory areas vm.max_map_count 65530 is too low, increase to at least 262144

ERROR: Elasticsearch did not exit normally - check the logs at /a/es/logs/my-cluster.log

系统:centos7.6 (vm虚拟机)

软件:java-1.8、elasticsearch-5.6.16-1.noarch

错误信息:

2019-11-21T00:29:51,557ERRORo.e.b.Bootstrap elk-1 node validation exception

1 bootstrap checks failed

1: memory locking requested for elasticsearch process but memory is not locked

解决方法一(关闭bootstrap.memory_lock:,会影响性能):

vim /etc/elasticsearch/elasticsearch.yml // 设置成false就正常运行了。

bootstrap.memory_lock: false

解决方法二(开启bootstrap.memory_lock:):

  1. 修改文件/etc/elasticsearch/elasticsearch.yml,上面那个报错就是开启后产生的,如果开启还要修改其它系统配置文件

bootstrap.memory_lock: true

  1. 修改文件/etc/security/limits.conf,最后添加以下内容。
bash 复制代码
vim /etc/security/limits.conf 
bash 复制代码
* soft nofile 65536

* hard nofile 65536

* soft nproc 32000

* hard nproc 32000

* hard memlock unlimited

* soft memlock unlimited
  1. 修改文件 /etc/systemd/system.conf ,分别修改以下内容。
bash 复制代码
DefaultLimitNOFILE=65536

DefaultLimitNPROC=32000

DefaultLimitMEMLOCK=infinity

改好后重启下系统。再启动elasticsearch就没报错了 。

bash 复制代码
vim /etc/sysctl.conf

保存文件并执行以下命令使修改生效:

bash 复制代码
   sysctl -p

es7.13.2启动报错:

bootstrap checks failed 1 of 2: max virtual memory areas vm.max_map_count 65530 is too low, increase to at least 262144

bash 复制代码
vim /etc/sysctl.conf

vm.max_map_count=262144

 sysctl -p
相关推荐
志栋智能1 小时前
超自动化安全的报告自动生成与分发
运维·安全·自动化
开开心心就好3 小时前
定时结束进程的小工具,到点还能关机
linux·运维·服务器·智能手机·pdf·电脑·word
风翼靓崽3 小时前
ansible
linux·运维·ansible
zhengfei6115 小时前
AI 渗透项目深度研究:从工具自动化到自主攻击系统,下一代 AI 渗透平台应该如何构建?
运维·人工智能·ai·开源·自动化·ai编程·ai-native
zz0723206 小时前
深入浅出 Nginx:核心原理与企业级应用
运维·nginx
cndes7 小时前
出现 2013 lost connection to MySQL server during query
运维·服务器·数据库
考虑考虑8 小时前
EMQX认证回调
运维·后端·自动化运维
耗同学一米八8 小时前
湖南省网络建设与运维赛项指导培训:备赛要点全解析
运维·网络·php·网络运维·网络建设与运维·楚怡杯·湖南技能竞赛
master3369 小时前
Linux 用户与权限体系:由浅入深完全指南
linux·运维·服务器
Lsetea9 小时前
www 跳转裸域前先查哪张证书?用 CertbotX 验收两个 HTTPS 入口
运维·https·ssl证书·http重定向·域名迁移