# 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:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geoB](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geob/32/49288_2.png) [@geoB](https://discuss.elastic.co/u/geoB)\
**Post date:** [July 2, 2019, 3:51pm UTC](https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549/1 "2019-07-02T15:51:29Z")

</div>

I'm new to Elasticsearch. Below are my eventually successful results. There were, however, errors along the way. I provide this on the off chance that it is useful.

With Win10 Pro, build 18362.175, java version "1.8.0\_211", installing via the msi hangs when launching the service. The related event was:

```
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.nio.file.NoSuchFileException: C:\ProgramData\Elastic\Elasticsearch\config\jvm.options
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:231)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:370)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:421)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
	at java.base/java.nio.file.Files.newInputStream(Files.java:155)
	at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:6...

```

After cancelling I downloaded and successfully installed from the the 6.7 msi. Service is up & running.

---

<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\

---

<div class="post-metadata">

**Author:** ![geoB](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geob/32/49288_2.png) [@geoB](https://discuss.elastic.co/u/geoB)\
**Post date:** [July 4, 2019, 6:37pm UTC](https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549/3 "2019-07-04T18:37:13Z")

</div>

Thanks for this. I've just learned that your experience occurs when attempting to launch Elasticsearch from the zip file rather than installing from the msi. I replicated the error you show, plus learned that one must use the administrator terminal. With your fix I was able to get the service up.

Before I worked with your approach I tried adding Elasticsearch to a Hyper-V Ubuntu installation. What I haven't figured out yet is how to access the VM's Elasticsearch from the host.

Where I want to get is a useful learning environment that will help me apply Elasticsearch to an existing Symfony PHP application.

Any suggestions?

---

<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:** [August 1, 2019, 6:37pm UTC](https://discuss.elastic.co/t/windows-service-7-2-fails-to-start/188549/4 "2019-08-01T18:37:13Z")

</div>

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