首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >elasticsearch服务器7.1未运行

问elasticsearch服务器7.1未运行
EN

Stack Overflow用户
提问于 2019-07-09 21:14:04
回答 1查看 490关注 0票数 0

我使用的是elasticsearch 7.2版,我想在生产模式下使用它,因为我对它的elasticsearch.yml文件做了一些修改,例如

代码语言:javascript
复制
network.host: 0.0.0.0
discovery.seed_hosts: ["192.168.1.8"]

通过以下链接访问https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html

https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#breaking_70_discovery_changes

当我运行elasticsearch服务器时,它抛出两条错误消息

代码语言:javascript
复制
[2019-07-09T18:07:04,978][DEBUG][o.e.a.ActionModule       ] [sara-Inspiron-7773] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-07-09T18:07:05,759][INFO ][o.e.d.DiscoveryModule    ] [sara-Inspiron-7773] using discovery type [zen] and seed hosts providers [settings]
[2019-07-09T18:07:06,418][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] initialized
[2019-07-09T18:07:06,419][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] starting ...
[2019-07-09T18:07:06,525][INFO ][o.e.t.TransportService   ] [sara-Inspiron-7773] publish_address {192.168.1.8:9300}, bound_addresses {[::]:9300}
[2019-07-09T18:07:06,531][INFO ][o.e.b.BootstrapChecks    ] [sara-Inspiron-7773] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-07-09T18:07:06,568][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] stopping ...
[2019-07-09T18:07:06,579][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] stopped
[2019-07-09T18:07:06,580][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] closing ...
[2019-07-09T18:07:06,594][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] closed
[2019-07-09T18:07:06,596][INFO ][o.e.x.m.p.NativeController] [sara-Inspiron-7773] Native controller process has stopped - no new native processes can be started

我确实添加了

代码语言:javascript
复制
elasticsearch    -       nofile          65535

在/etc/security/limits.conf文件中,对于日志中的错误1,在https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#limits.conf中给出,但是我没有解决这个问题,我再次尝试登录并运行elasticsearch服务器,但是没有帮助

EN

回答 1

Stack Overflow用户

发布于 2019-07-09 23:29:08

我认为您应该运行ulimit -n unlimited来使用来自/etc/security/limits.conf的值。

如果不工作,则返回

检查文件描述符数量的硬限制:ulimit -Hn。如果它低于65536,您将无法增加软限制。要增加硬限制,请以根用户身份连接并运行ulimit -Hn 65536。

使用elasticsearch用户使用ulimit -Sn 65536将软限制设置为65536

重新启动elasticsearch。

仍然不能工作?

如果没有在其他地方设置限制,请检入.bashrc文件和其他类似文件。

有关软/硬限制的详细信息,请阅读this article。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56953453

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档