Elicsearch takes some time to come up completely, here are some of the things you can check:
Check limits in /etc/security/limits.conf
elasticsearch - nofile 65536
Also check this out at /etc/pam.d/su
session required pam_limits.so
If you use systemd check in /usr/lib/systemd/system/elasticsearch.service
[Service] LimitMEMLOCK=infinity
Also add this:
LimitNOFILE=131070
Now check the memory in /etc/elasticsearch/jvm.options , this is what depends on your system, you will need to fine tune it if I use this feature:
-Xms{{ (ansible_memtotal_mb * 0.0007) | int }}g -Xmx{{ (ansible_memtotal_mb * 0.0007) | int }}g
but for starters, you can just use half of your system, if you have 16 GB, give 8:
-Xms8g -Xmx8g
And last but not least, know the resources that the moose stack may need:
The device with 64 GB of RAM is an ideal place for sweets, but 32 GB and 16 GB machines are also common.
https://www.elastic.co/guide/en/elasticsearch/guide/current/hardware.html#_memory
nbari source share