Troubleshooting Guide: Elasticsearch Service Does Not Start

How to troubleshoot the issue of Elasticsearch service not starting up as expected?

Primary Troubleshooting Step:

Start the Elasticsearch.exe file manually and understand the error message reported, to confirm the background issue that is causing the Elasticsearch service to not start as expected. The following steps should help,

  1. Launch command prompt in administrative mode
  2. Navigate to the Elasticsearch installation location's bin path (by default: C:\Program Files\Elastic\Elasticsearch\6.X.X\bin)
  3. Run the Elasticsearch.exe file via the command prompt and there should be an error message following the trigger.

Based on the error message, the below troubleshooting approach can be applied.

Note: Both of the below issues are due to 32 bit versions of Java 8 being installed on the Elasticsearch machine. If either or both of them are observed, the easiest fix would be to uninstall 32 bit of Java and install the 64 bit version of Java. This will ensure more compatibility, but in case the same is not possible, the below steps can be performed as a work around via re-configuration.

Troubleshooting Approach #1: "Error occurred during initialization of VM Could not reserve enough space for object heap" error message
  1. The issue is usually present when a 32 bit version of Java is not compatible with the default memory heap memory allocation of 2 GB by Elasticsearch.
  2. To fix the same, the java configuration in the jvm.options file (available by default at C:\ProgramData\Elastic\Elasticsearch\config) for "-xmx" and "-xms" values can be adjusted to 1024 MB or lower.

Troubleshooting Approach #2: "X-Pack not supported, Machine learning not available" error message
  1. This issue is due to the 32 bit version of Java available on the machine not being compatible with the machine learning models available with Elasticsearch's basic X-Pack functionality (the free X-Pack functionality available during installation itself).
  2. This will have to be configured manually to disable the related X-Pack functionality in the configuration.
  3. This can be done by adding false in the Elasticsearch.yml file (available by default at C:\ProgramData\Elastic\Elasticsearch\config).
Read more on the below Elasticsearch topics: