EnDelt64
EnDelt64

Reputation: 1360

ElasticSearch service fails to start on Windows

ElasticSearch(2.4.6) service is keep failing to start on Windows.

[2019-02-01 12:27:59] [info]  [14564] Starting service...
[2019-02-01 12:27:59] [error] [15256] CreateJavaVM Failed
[2019-02-01 12:27:59] [error] [15256] The system cannot find the file specified.
[2019-02-01 12:27:59] [error] [14564] Failed to start Java
[2019-02-01 12:27:59] [error] [14564] ServiceStart returned 4

I'm using Java 10, but ElasticSearch 2.4.6 doesn't support Java 9+ so I have set Java 8 JRE's path manually in elasticsearch.bat and service.bat file.

...
set JAVA_HOME=C:\Program Files\Java\jre1.8.0_191
...

There is no problem while launching ES binary and installing ES as a service, but 'starting' the service is currently impossible.

How to I fix this? I'm also using Haystack, and it supports only ElasticSearch 1.x and 2.x, so I can't upgrade the version of ElasticSearch.

Upvotes: 5

Views: 5648

Answers (2)

jeevu94
jeevu94

Reputation: 718

just run /bin/elasticsearch.bat through command line thats it.

Upvotes: 1

Mebin Joe
Mebin Joe

Reputation: 2209

Try setting JAVA_HOME to jdk path in the system variables.

Upvotes: 3

Related Questions