1. 程式人生 > >elasticsearch max virtual memory areas vm.max_map_count [65530] is too low, increase to at

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

[2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [lang-mustache] [2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [lang-painless] [2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [parent-join] [2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [percolator] [2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [reindex] [2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [transport-netty3] [2018-09-17T15:36:33,379][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded module [transport-netty4] [2018-09-17T15:36:33,380][INFO ][o.e.p.PluginsService     ] [eRhUmHs] loaded plugin [analysis-ik] [2018-09-17T15:36:34,375][INFO ][o.e.d.DiscoveryModule    ] [eRhUmHs] using discovery type [zen] [2018-09-17T15:36:34,892][INFO ][o.e.n.Node               ] initialized [2018-09-17T15:36:34,892][INFO ][o.e.n.Node               ] [eRhUmHs] starting ... [2018-09-17T15:36:35,036][INFO ][o.e.t.TransportService   ] [eRhUmHs] publish_address {192.168.0.244:9300}, bound_addresses {192.168.0.244:9300} [2018-09-17T15:36:35,044][INFO ][o.e.b.BootstrapChecks    ] [eRhUmHs] bound or publishing to a non-loopback address, enforcing bootstrap checks [2018-09-17T15:36:35,046][ERROR][o.e.b.Bootstrap          ] [eRhUmHs] node validation exception [2] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] [2018-09-17T15:36:35,048][INFO ][o.e.n.Node               ] [eRhUmHs] stopping ... [2018-09-17T15:36:35,065][INFO ][o.e.n.Node               ] [eRhUmHs] stopped [2018-09-17T15:36:35,066][INFO ][o.e.n.Node               ] [eRhUmHs] closing ... [2018-09-17T15:36:35,078][INFO ][o.e.n.Node               ] [eRhUmHs] closed  

解決方法:

1、切換到root使用者修改配置sysctl.conf

vi /etc/sysctl.conf 
  • 1

新增下面配置:

vm.max_map_count=655360
  • 1

並執行命令:

sysctl -p
  • 1

然後,重新啟動elasticsearch,即可啟動成功。