elasticsearch启动不起来,错误码78解决办法
Problem:
You want to run ElasticSearch using docker, but the container immediately stops again using this error message
elasticsearch exited with code 78
1
or
elasticsearch2 exited with code 78
1
Solution:
If you look through the entire log message, you’ll find lines like
elasticsearch | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
1
解决:
切换到root用户
执行命令:
sysctl -w vm.max_map_count=262144
1
查看结果:
sysctl -a|grep vm.max_map_count
1
显示:
vm.max_map_count = 262144
1
上述方法修改之后,如果重启虚拟机将失效,所以:
解决办法:
在 /etc/sysctl.conf文件最后添加一行
vm.max_map_count=262144
1
即可永久修改
当运行ElasticsearchDocker容器时遇到退出代码78,问题可能与vm.max_map_count设置过低有关。解决方案是将该值提高到至少262144,可以通过执行`sysctl-wvm.max_map_count=262144`临时解决,但重启后会失效。要永久修改,需在`/etc/sysctl.conf`文件末尾添加行`vm.max_map_count=262144`。
1057

被折叠的 条评论
为什么被折叠?



