安装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. (转)Spring事务管理(详解+实例)

    文章转自:http://blog.csdn.net/trigl/article/details/50968079 写这篇博客之前我首先读了<Spring in action>,之后在网上看 ...

  2. json.stringify()的妙用,json.stringify()与json.parse()的区别

    一.JSON.stringify()与JSON.parse()的区别 最近做项目,发现JSON.stringify()使用场景真的挺多,我们都知道JSON.stringify()的作用是将 JavaS ...

  3. es6学习笔记4--数组

    数组的扩展 Array.from() Array.from方法用于将两类对象转为真正的数组:类似数组的对象(array-like object)和可遍历(iterable)的对象(包括ES6新增的数据 ...

  4. PHP初级程序员出路

    分销系统 微信公众号开发 分销系统 微信小程序

  5. UIView动画上

    主要参考:http://blog.csdn.net/huifeidexin_1/article/details/7597868  http://www.2cto.com/kf/201409/33566 ...

  6. [转]Winform开发框架的重要特性总结

    本文转自:https://www.cnblogs.com/wuhuacong/p/3199829.html 从事Winform开发框架的研究和推广,也做了有几个年头了,从最初的项目雏形到目前各种重要特 ...

  7. jQuery实现两个DropDownList联动(MVC)

    近段时间原本是学习MVC的,谁知道把jQuery也学上了.而且觉得对jQuery更感兴趣,比如今早上有写了一个练习<jQuery实现DropDownList(MVC)>http://www ...

  8. 手机调试 --- 通过chrome测试手机网站

     移动端有时候我们要调试手机网站. Chrome怎么调试手机页面呢? 毕竟有时候手机支持的JS度跟PC不一样.最开始就遇见了.手机端浏览器不支持执行string.includes. PC端支持该函数, ...

  9. 常用的Array相关的属性和方法

    Array 对象属性constructor 返回对创建此对象的数组函数的引用. length 设置或返回数组中元素的数目. prototype 使您有能力向对象添加属性和方法. Array 对象方法c ...

  10. Dapper入门使用,代替你的DbSQLhelper

    Dapper介绍 Dapper是.Net下的一个轻量级ORM框架.在小型工具向的项目下,使用Dapper会使数据库操作层代码更加优雅. Dapper的使用 在项目中使用引用Dapper非常简单,你可以 ...