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

**URL:** <https://discuss.elastic.co/t/elasticsearch-service-on-windows-10-not-starting-es-path-conf-not-set/243172>\
**Category:** Elasticsearch\
**Created:** [July 30, 2020, 7:16am UTC](https://discuss.elastic.co/t/elasticsearch-service-on-windows-10-not-starting-es-path-conf-not-set/243172 "2020-07-30T07:16:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![feva](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@feva](https://discuss.elastic.co/u/feva)\
**Post date:** [July 30, 2020, 7:16am UTC](https://discuss.elastic.co/t/elasticsearch-service-on-windows-10-not-starting-es-path-conf-not-set/243172/1 "2020-07-30T07:16:04Z")

</div>

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](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)

---

<div class="post-metadata">

**Author:** ![feva](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@feva](https://discuss.elastic.co/u/feva)\
**Post date:** [August 4, 2020, 6:33am UTC](https://discuss.elastic.co/t/elasticsearch-service-on-windows-10-not-starting-es-path-conf-not-set/243172/2 "2020-08-04T06:33:24Z")

</div>

I was able to find the problem, see [https://github.com/elastic/elasticsearch/pull/57769](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)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 1, 2020, 6:33am UTC](https://discuss.elastic.co/t/elasticsearch-service-on-windows-10-not-starting-es-path-conf-not-set/243172/3 "2020-09-01T06:33:30Z")

</div>

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