网站建设资讯详细

elasticsearch 启动报错,future versions of Elasticsearch,max virtual memory areas vm.max_map

发表日期:2024-08-06 19:08:40   作者来源:水沐科技   浏览:545       

[search@192 bin]$ ./elasticsearch -d
future versions of Elasticsearch will require Java 11; your Java version from [/data/web/env/jdk1.8.0_271/jre] does not meet this requirement
[search@192 bin]$ ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/local/elasticsearch/elasticsearch-7.6.0/logs/my-esCluster.log

 

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]解决方法:

1.临时设置:

执行以下命令来临时增加 vm.max_map_count 的值:

sudo sysctl -w vm.max_map_count=262144

这将立即生效,但在系统重启后将失效。

2.永久设置:

编辑 /etc/sysctl.conf 文件,添加或修改以下行:

vm.max_map_count=262144

然后运行以下命令来使改动生效:

sudo sysctl -p