Technical Note: ZoneFox 3 - Elasticsearch doesn't start automatically after a system reboot
Description
Scope
Solution
Elasticsearch doesn't start automatically after a system reboot
Scope
Installation and Administration
Solution
Problem
The Elasticsearch service attempts to start automatically after the Centos server is rebooted, but fails to start. The service can be started manually.
Workaround
This behaviour has been seen to be caused by different issues:
- The Elasticsearch service attempts to start before the networkmanager service has started, resulting in Elasticsearch being unable to resolve its own hostname. An error message is displayed in the Elasticsearch log file.
To fix this issue, you can add the following to the /lib/systemd/system/elasticsearch-es-01.service file:
[Unit]
After=NetworkManager.service
- The Elasticsearch service attempts to start before the NFS share is mounted, meaning Elasticsearch cannot access its log file in /data/elasticsearch/log/ZoneFox_Cluster.log. An error message is displayed in /var/log/messages.
To fix this issue, you can add the following to the /lib/systemd/system/elasticsearch-es-01.service file:
[Unit]
RequiresMountsFor=/data
