# Windows service 7.2 fails to start

**URL:** <https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549>\
**Category:** Elasticsearch\
**Created:** [July 2, 2019, 3:51pm UTC](https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549 "2019-07-02T15:51:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AaronT](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@AaronT](https://discuss.elastic.co/u/AaronT)\
**Post date:** [July 4, 2019, 6:01am UTC](https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549/2 "2019-07-04T06:01:22Z")

</div>

I had a similar issue:

```
Service cannot be started. Elastic.ProcessHosts.Process.StartupException: Could not evaluate jvm.options file: C:\ProgramData\Elastic\Elasticsearch\config\jvm.options result: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
[0.002s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed.
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
	at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
	at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonom...

```

Seems my issue was that it was trying to write to C:\Windows\System32\logs\gc.log

So to fix i edited: C:\ProgramData\Elastic\Elasticsearch\config\jvm.options  
9-:-Xlog:gc\*,gc+age=trace,safepoint:file=\ProgramData\Elastic\Elasticsearch\logs\gc.log:utctime,pid,tags:filecount=32,filesize=64m

there must have been a change that the JVM doesn't start in: C:\ProgramData\Elastic\Elasticsearch\

---

_[View the full topic](https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549)._
