Elasticsearch6.4 max number of threads [2048] for user [*] is too low, increase to at least [4096]异常

 Elasticsearch6.4修改配置文件./bin/elasticsearch.yml的network.host:0.0.0.0,启动报:max number of threads [2048] for user [es] is too low, increase to at least [4096]

018-08-28T03:11:52,299][INFO ][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/usr/elasticsearch/elasticsearch-6.4.0/config/roles.yml]
[2018-08-28T03:11:53,139][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/2118] [Main.cc@109] controller (64 bit): Version 6.4.0 (Build cf8246175efff5) Copyright (c) 2018 Elasticsearch BV
[2018-08-28T03:11:53,941][DEBUG][o.e.a.ActionModule       ] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2018-08-28T03:11:54,406][INFO ][o.e.d.DiscoveryModule    ] [node-1] using discovery type [zen]
[2018-08-28T03:11:55,812][INFO ][o.e.n.Node               ] [node-1] initialized
[2018-08-28T03:11:55,813][INFO ][o.e.n.Node               ] [node-1] starting ...
[2018-08-28T03:11:56,124][INFO ][o.e.t.TransportService   ] [node-1] publish_address {192.168.10.102:9300}, bound_addresses {[::]:9300}
[2018-08-28T03:11:56,205][INFO ][o.e.b.BootstrapChecks    ] [node-1] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max number of threads [2048] for user [es] is too low, increase to at least [4096]
[2018-08-28T03:11:56,264][INFO ][o.e.n.Node               ] [node-1] stopping ...
[2018-08-28T03:11:56,284][INFO ][o.e.n.Node               ] [node-1] stopped
[2018-08-28T03:11:56,284][INFO ][o.e.n.Node               ] [node-1] closing ...
[2018-08-28T03:11:56,309][INFO ][o.e.n.Node               ] [node-1] closed
[es@localhost elasticsearch-6.4.0]$

解决办法:

  • 新建(为方便删除)

            /etc/security/limits.d/test-limits.conf

  • 添加

            * soft nofile 65536
            * hard nofile 131072
            * soft nproc 4096
            * hard nproc 4096

  • 重启服务器(不会重新编译文件,你如果会可以不重启)

你可能感兴趣的:(插件)