如何修复 'elasticsearch exited with code 78'
问题:
你想使用 docker 运行 ElasticSearch,但容器立即停止并显示此错误消息
es_exited_code78.txt
elasticsearch exited with code 78or
es_exited_code78_instance.txt
elasticsearch2 exited with code 78解决方案
如果你查看整个日志消息,你会发现类似这样的行
es_max_map_count_error.txt
elasticsearch | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]因此我们需要增加 vm.max_map_count 限制:
set_vm_max_map_count.sh
sudo sysctl -w vm.max_map_count=524288现在我们需要编辑 /etc/sysctl.conf 以便设置在重启后也生效。
在 /etc/sysctl.conf 中查找任何 vm.max_map_count 行。如果找到一个,将其值设置为 524288。如果没有这样的行,添加行
add_vm_max_map_count.conf
vm.max_map_count=524288到 /etc/sysctl.conf 的末尾
原始来源:GitHub
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow