bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
时间: 2023-08-26 11:11:28 浏览: 255
这个错误是由于Elasticsearch的启动引导检查中发现了一个问题。它指出了`vm.max_map_count`的值过低,需要将其增加到至少`262144`。
您可以按照以下步骤来增加`vm.max_map_count`的值:
1. 以root用户身份登录到您的系统。
2. 打开一个终端窗口,并执行以下命令来查看当前的`vm.max_map_count`值:
```
sysctl vm.max_map_count
```
3. 如果当前值低于`262144`,则需要增加它。可以通过执行以下命令来临时增加它:
```
sysctl -w vm.max_map_count=262144
```
如果您希望永久更改该值,请编辑`/etc/sysctl.conf`文件,并在文件末尾添加以下行:
```
vm.max_map_count=262144
```
4. 保存文件并关闭编辑器。
5. 执行以下命令以使更改生效:
```
sysctl -p
```
现在,您可以尝试重新启动Elasticsearch,这个错误应该不再出现了。如果问题仍然存在,请确保您按照上述步骤正确地更改了`vm.max_map_count`的值,并且您具有足够的权限进行更改。
相关问题
bootstrap checks failed [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least
bootstrap checks failed : max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 这个错误是由于Elasticsearch启动时对系统进行了一系列的检查,而其中的一个检查是检查虚拟内存区域的最大数量(vm.max_map_count)是否足够高。在这个错误中,虚拟内存区域的最大数量被检测到太低了,需要至少增加到262144。
有两种解决方案可以解决这个问题。第一种是临时修改虚拟内存区域的最大数量,可以使用以下命令来修改:
```
sysctl -w vm.max_map_count=262144
```
第二种是永久修改虚拟内存区域的最大数量,可以使用以下命令来修改/etc/sysctl.conf文件:
```
echo vm.max_map_count=262144 >> /etc/sysctl.conf
```
然后使用以下命令来使修改生效:
```
sysctl -p
```
另外,如果你使用Docker运行Elasticsearch,可以在Docker run命令中添加以下参数来增加虚拟内存区域的最大数量:
```
docker run -d -p 9200:9200 -p 9300:9300 --name <自定义容器名字> -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -e "discovery.type=single-node" --sysctl vm.max_map_count=262144 <容器ID>
```
这样就能够解决bootstrap checks failed : max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]这个错误了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [ [1] bootstrap checks failed [1]: max virtual memory areas vm.max_map_count [65530] is too l](https://blog.csdn.net/qq_42704442/article/details/128000463)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [解决Docker启动Elasticsearch7.x报错的问题](https://download.csdn.net/download/weixin_38719475/14048015)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]](https://blog.csdn.net/jcmj123456/article/details/120477158)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. bootstrap check failure [1] of [1]: memory locking requested for elasticsearch process but memory is not locked ERROR: Elas
ticsearch requires memory locking in order to ensure that the Java Virtual Machine (JVM) can manage memory effectively. In order to address this error, you need to increase the maximum memory map count value of your system.
To do this, you can modify the /etc/sysctl.conf file and add the following lines:
```
vm.max_map_count=262144
```
After adding this line, you can run the following command to apply the changes:
```
sudo sysctl -p
```
This should resolve the memory locking issue and allow you to start Elasticsearch.
阅读全文