简体   繁体   English

弹性搜索无法启动

[英]Elastic Search does not start

When I start elastic search, I see "Killed" on the console and the process ends. 当我开始弹性搜索时,我在控制台上看到“已杀死”并且过程结束。 I am unable to get the elastic search process to start. 我无法启动弹性搜索过程。 What am I missing? 我错过了什么?

:~/elasticsearch-5.5.2/bin$ ./elasticsearch
Killed

If it is relevant, I am installing this on a VPS. 如果它是相关的,我在VPS上安装它。 I don't see any other error message - making it hard to debug. 我没有看到任何其他错误消息 - 使调试变得困难。

As of configuring RAM usage by Elasticsearch 至于配置Elasticsearch的RAM使用情况

By default, elasticsearch tries to occupy 1Gb of RAM at start, so if your VPS has less than 1Gb of RAM you need to configure elasticsearch to use less RAM accordingly 默认情况下,elasticsearch尝试在启动时占用1Gb的RAM,因此如果您的VPS具有小于1Gb的RAM ,则需要配置elasticsearch以相应地使用较少的RAM

As an alternative to above file configuration you can try export of corresponding environment variable 作为上述文件配置的替代,您可以尝试导出相应的环境变量

export ES_JAVA_OPTS="-Xms256m -Xmx256m" export ES_JAVA_OPTS =“ - Xms256m -Xmx256m”

and then check if it helps 然后检查它是否有帮助

./elasticsearch ./elasticsearch

Regarding the exit state 关于退出状态

Killed 杀害

It most frequently indicates the OoM Killer process activity which is aimed on emergent RAM freeing to let Linux survive the lack of available RAM event. 最常表示OoM Killer进程活动,该活动针对紧急RAM释放,让Linux在缺乏可用RAM事件的情况下生存。 OoM Killer, as per his name, sends kill signal to some most memory-consuming user process. 根据他的名字,OoM Killer会向一些耗费大量内存的用户进程发送kill信号。

As of VPS and it's virtualization model, there are some custom container-based OoM settings in effect (check out example for OpenVZ ), so if you're 100% sure you're configured ealsticsearch correctly, and there is enough RAM to start its instance - contact your VPS provider to clarify possible limits (like 10% of RAM must always be free or OoM Killer is triggered otherwise) 从VPS及其虚拟化模型来看,有一些基于容器的自定义OoM设置生效(查看OpenVZ的示例 ),因此,如果您100%确定您已正确配置ealsticsearch,并且有足够的RAM来启动它实例 - 联系您的VPS提供商以澄清可能的限制(例如,10%的RAM必须始终是免费的,否则会触发OoM Killer)

Some debug approach to OoM Killer events is described in this answer 本答案中描述了一些针对OoM Killer事件的调试方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM