Elasticsearch-service on windows 10 not starting (es.path.conf not set)

I have some troubles installing elasticsearch as a service.
I am working on Windows 10 with elasticsearch-7.8.0
The log files say
Failed to start service
2020-07-30 08:50:17 Commons Daemon procrun stderr initialized
ERROR: the system property [es.path.conf] must be set

The environment variables ES_PATH_CONF and ES_HOME are set (also tried setting ES_CONF_HOME).
Also tried to include the line
if not "%ES_JAVA_OPTS%" == "" set ES_JAVA_OPTS=%ES_JAVA_OPTS:;;=;%
in elasticsearch-service.bat as stated in https://github.com/elastic/elasticsearch/issues/56977

I am using java -version
openjdk version "11.0.8" 2020-07-14 LTS
OpenJDK Runtime Environment Corretto-11.0.8.10.1 (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.8.10.1 (build 11.0.8+10-LTS, mixed mode)

I was able to find the problem, see https://github.com/elastic/elasticsearch/pull/57769
You have to insert the line
if not "%ES_JAVA_OPTS%" == "" set ES_JAVA_OPTS=%ES_JAVA_OPTS:;;=;%
twice, always after line
if not "%ES_JAVA_OPTS%" == "" set ES_JAVA_OPTS=%ES_JAVA_OPTS: =;%
(line 124 and 134)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.