安装elasticsearch报错如下:

[2019-01-14T03:57:16,453][ERROR][o.e.b.Bootstrap          ] [ip-172-31-30-62.ec2.internal] node validation exception
[1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked

所以就去网上查找资料,发现都不是适应自己的环境。最后在官网找到了方法:

不过先跟大家声明一点就是:环境不一样解决的方法也不一样,我这里是Centos7.5版本的系统,所有的服务都由systemd来管理。elasticsearch是6.5.4版本,使用RPM包的方式安装的。

现在我们开始解决问题:

1、修改/etc/sysconfig/elasticsearch文件调整JVM内存大小

ES_JAVA_OPTS="-Xms4g -Xmx4g"
MAX_LOCKED_MEMORY=unlimited

替换4g为总内存的一半(Elasticsearch官方建议是主机总内存的一半)

2、修改/etc/security/limits.conf文件内容

elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited

需要将elasticsearch替换为运行Elasticsearch程序的用户

3、在/etc/systemd/system/elasticsearch.service.d目录下创建一个文件override.conf,并添加下列内容

[Service]
LimitMEMLOCK=infinity

详情我们可以参考:https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#systemd

4、最后重新载入配置文件更新服务

systemctl daemon-reload

这个时候再重启即可解决问题

elasticsearch报错之 memory locking requested for elasticsearch process but memory is not locked的更多相关文章

  1. 【已解决】ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked

    官网说明: elasticsearch官网建议生产环境需要设置bootstrap.memory_lock: true 官网的解释 是:发生系统swapping的时候ES节点的性能会非常差,也会影响节点 ...

  2. elasticsearch6.4 memory locking requested for elasticsearch process but memory is not locked

    [2018-10-18T05:28:57,713][ERROR][o.e.b.Bootstrap ] [node-45] node validation exception[1] bootstrap ...

  3. ES解决bootstrap checks failed, memory locking requested for elasticsearch process but memory is not locked问题

    问题描述: ERROR: [1] bootstrap checks failed[1]: memory locking requested for elasticsearch process but ...

  4. elasticsearch6.4 memory locking requested for elasticsearch process but memory is not locked 终极解决

    echo "es hard memlock unlimited">>/etc/security/limits.confecho "es soft memloc ...

  5. Elasticsearch 报错:Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_field_name`] in order to load fielddata in memory by uninverting the inverted index.

    Elasticsearch 报错: Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_fi ...

  6. keras 报错 ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(5001, 128), dtype=float32)'

    在服务器上训练并保存模型,复制到本地之后load_model()报错: ValueError: Tensor conversion requested dtype int32 for Tensor w ...

  7. elasticsearch报错:None of the configured nodes are available: []

    问题:在内网测试的时候可以正常访问,但是部署到外网上客户端连接elasticsearch报错:None of the configured nodes are available: [] 原因:默认情 ...

  8. Springboot整合Elasticsearch报错availableProcessors is already set to [4], rejecting [4]

    Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了. nested exception is j ...

  9. elasticsearch报错[WARN ][bootstrap ] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory,解决

    早上在服务器上安装elasticsearch集群,在其中的一台上面安装好elasticsearch之后安装了一些插件,其中一个插件是marvel,结果可能是新版本不支持这个插件,就没有安装成功,也就索 ...

随机推荐

  1. Tomcat学习总结(5)——Tomcat容器管理安全的几种验证方式

    当访问服务器中受保护的资源时,容器管理的验证方法可以控制确认用户身份的方式.Tomcat支持四种容器管理的安全防护,它们是: BASIC (基本验证):通过HTTP验证,需要提供base64编码文本的 ...

  2. 白话$resource,$resource中的增删改查

    前言 $resource详解,在学习angular的过程中,我们已经知道,$http能十分便捷的为我们实现与后端的数据交互,格式如下: $http({method:'GET'},url:'XX').t ...

  3. vue实用组件——页面公共头部

    可伸缩自适应的页面头部,屏幕适应范围更广泛 效果如下: 代码如下: <template> <div class="site-header"> <div ...

  4. Linux下安装SQL Server 2016(准备篇SQL Server on linux)

    要在Linux安装sql server,首先的先有linux,下面会讲下载,然后安装Linux. 一.下载centos 7.2 : Centos 7.2下载 大概4G左右,这个链接的下载速度还是非常快 ...

  5. [EWS]如何: 通过使用 Exchange 中的 EWS 流有关邮箱事件的通知

    摘要 在之前的文章中,介绍ews拉通知的模式订阅邮件.详情可阅读这篇文章:EWS 通过SubscribeToPullNotifications订阅Exchange新邮件提醒 ,可以看到拉通知的模式,是 ...

  6. HDU1824(2-SAT)

    Let's go home Time Limit: 10000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  7. python-策略模式

    源码地址:https://github.com/weilanhanf/PythonDesignPatterns 说明: 策略指的就是为了达到某一目的而采取的手段或者方法.为了实现软件设计咪表,对象可能 ...

  8. 一步步弄懂HTTPS

    为什么要使用HTTPS? HTTP采用明文传输,存在被监听.内容被篡改.身份被冒充的可能.为了保证安全性,需要对数据进行加密,这便有了HTTPS. 一步步分析HTTPS 1. 采用哪种加密方式加密数据 ...

  9. promise 拙见

    一,promise是什么? promise 是最早由社区提出和实现是一种解决异步编程的方案,比其他传统的解决方案(回调函数和事件)更合理和强大. ES6 将其写进了语言标准,统一了用法,原生提供了 p ...

  10. cmd--登录mysql

    cmd,Windows 命令提示符(cmd.exe)是 Windows NT 下的一个用于运行 Windows 控制面板程序或某些 DOS 程序的shell程序:或在 Windows CE 下只用于运 ...