简体   繁体   中英

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. I don't see any other error message - making it hard to debug.

As of configuring RAM usage by Elasticsearch

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

As an alternative to above file configuration you can try export of corresponding environment variable

export ES_JAVA_OPTS="-Xms256m -Xmx256m"

and then check if it helps

./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, as per his name, sends kill signal to some most memory-consuming user process.

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)

Some debug approach to OoM Killer events is described in this answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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