微信搜索superit|邀请体验:大数据, 数据管理、OLAP分析与可视化平台 | 赞助作者:赞助作者

elasticsearch max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

elasticsearch aide_941 99℃

Ubuntu elasticsearch max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

[2019-05-05T21:13:28,540][INFO ][o.e.p.PluginsService     ] [master] no plugins loaded
[2019-05-05T21:13:31,541][INFO ][o.e.x.s.a.s.FileRolesStore] [master] parsed [0] roles from file [/usr/local/elasticsearch/elasticsearch-7.0.1/config/roles.yml]
[2019-05-05T21:13:32,087][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [master] [controller/31006] [Main.cc@109] controller (64 bit): Version 7.0.1 (Build 6a88928693d862) Copyright (c) 2019 Elasticsearch BV
[2019-05-05T21:13:32,489][DEBUG][o.e.a.ActionModule       ] [master] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-05-05T21:13:33,235][INFO ][o.e.d.DiscoveryModule    ] [master] using discovery type [zen] and seed hosts providers [settings]
[2019-05-05T21:13:33,848][INFO ][o.e.n.Node               ] [master] initialized
[2019-05-05T21:13:33,849][INFO ][o.e.n.Node               ] [master] starting ...
[2019-05-05T21:13:33,970][INFO ][o.e.t.TransportService   ] [master] publish_address {172.18.0.2:9300}, bound_addresses {[::]:9300}
[2019-05-05T21:13:33,976][INFO ][o.e.b.BootstrapChecks    ] [master] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: memory locking requested for elasticsearch process but memory is not locked
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-05-05T21:13:33,984][INFO ][o.e.n.Node               ] [master] stopping ...
[2019-05-05T21:13:34,011][INFO ][o.e.n.Node               ] [master] stopped
[2019-05-05T21:13:34,011][INFO ][o.e.n.Node               ] [master] closing ...
[2019-05-05T21:13:34,020][INFO ][o.e.n.Node               ] [master] closed
[2019-05-05T21:13:34,022][INFO ][o.e.x.m.p.NativeController] [master] Native controller process has stopped - no new native processes can be started
[es@master elasticsearch-7.0.1]$ ll /etc/security/limits.d/90-nproc.conf
ls: cannot access /etc/security/limits.d/90-nproc.conf: No such file or directory

解决办法1:

在宿主主机中执行

[root@localhost ~]# sysctl -w vm.max_map_count=262144

[root@localhost ~]# sysctl -a|grep vm.max_map_count
vm.max_map_count = 262144

这种重启会失效

解决办法2:

/etc/sysctl.conf文件最后添加一行:

vm.max_map_count=262144

立即生效, 执行:

/sbin/sysctl -p

OK

版权声明:作者:jiankunking 出处:http://blog.csdn.net/jiankunking 本文版权归作者和CSDN共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。 https://blog.csdn.net/xunzaosiyecao/article/details/65448030

具体错误信息如下:

jiankunking@ubuntu:~/software/elasticsearch$ ./bin/elasticsearch
[2017-03-23T18:14:05,880][INFO ][o.e.n.Node               ] [] initializing ...
[2017-03-23T18:14:06,151][INFO ][o.e.e.NodeEnvironment    ] [r5Eus3r] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [11.1gb], net total_space [17.5gb], spins? [possibly], types [ext4]
[2017-03-23T18:14:06,152][INFO ][o.e.e.NodeEnvironment    ] [r5Eus3r] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-03-23T18:14:06,154][INFO ][o.e.n.Node               ] [r5Eus3r] node name [r5Eus3r] derived from node ID; set [node.name] to override
[2017-03-23T18:14:06,171][INFO ][o.e.n.Node               ] [r5Eus3r] version[5.0.1], pid[3669], build[080bb47/2016-11-11T22:08:49.812Z], OS[Linux/4.8.0-41-generic/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_121/25.121-b13]
[2017-03-23T18:14:08,104][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [aggs-matrix-stats]
[2017-03-23T18:14:08,110][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [ingest-common]
[2017-03-23T18:14:08,110][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [lang-expression]
[2017-03-23T18:14:08,111][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [lang-groovy]
[2017-03-23T18:14:08,111][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [lang-mustache]
[2017-03-23T18:14:08,111][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [lang-painless]
[2017-03-23T18:14:08,111][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [percolator]
[2017-03-23T18:14:08,111][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [reindex]
[2017-03-23T18:14:08,112][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [transport-netty3]
[2017-03-23T18:14:08,112][INFO ][o.e.p.PluginsService     ] [r5Eus3r] loaded module [transport-netty4]
[2017-03-23T18:14:08,113][INFO ][o.e.p.PluginsService     ] [r5Eus3r] no plugins loaded
[2017-03-23T18:14:12,904][INFO ][o.e.n.Node               ] [r5Eus3r] initialized
[2017-03-23T18:14:12,905][INFO ][o.e.n.Node               ] [r5Eus3r] starting ...
[2017-03-23T18:14:13,161][INFO ][o.e.t.TransportService   ] [r5Eus3r] publish_address {127.0.0.1:9300}, bound_addresses {[::]:9300}
[2017-03-23T18:14:13,165][INFO ][o.e.b.BootstrapCheck     ] [r5Eus3r] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2017-03-23T18:14:13,199][INFO ][o.e.n.Node               ] [r5Eus3r] stopping ...
[2017-03-23T18:14:13,250][INFO ][o.e.n.Node               ] [r5Eus3r] stopped
[2017-03-23T18:14:13,250][INFO ][o.e.n.Node               ] [r5Eus3r] closing ...
[2017-03-23T18:14:13,274][INFO ][o.e.n.Node               ] [r5Eus3r] closed
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27

解决办法:
1、切换到root用户修改配置sysctl.conf

vi /etc/sysctl.conf 
  • 1

添加下面配置:

vm.max_map_count=655360
  • 1

并执行命令:

sysctl -p
  • 1

然后,重新启动elasticsearch,即可启动成功。

转载请注明:SuperIT » elasticsearch max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

喜欢 (0)or分享 (0)