# Not able to start elasticsearch post customization to modify default paths

**URL:** <https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560>\
**Category:** Elastic Search\
**Created:** [June 27, 2025, 8:58am UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560 "2025-06-27T08:58:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkat\_tammi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkat_tammi/32/143884_2.png) [@venkat\_tammi](https://discuss.elastic.co/u/venkat_tammi)\
**Post date:** [June 27, 2025, 8:58am UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/1 "2025-06-27T08:58:00Z")

</div>

I am getting below error message while starting elasticsearch post configuration path modification.

Jun 27 08:29:46 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Main process exited, code=exited, status=70/SOFTWARE  
Jun 27 08:29:46 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Failed with result 'exit-code'.  
Jun 27 08:29:46 ip-.eu-central-1.compute.internal systemd[1]: Failed to start Elasticsearch.

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [June 27, 2025, 11:31am UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/2 "2025-06-27T11:31:14Z")

</div>

What dies

journalctl -u elasticsearch

say

---

<div class="post-metadata">

**Author:** ![venkat\_tammi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkat_tammi/32/143884_2.png) [@venkat\_tammi](https://discuss.elastic.co/u/venkat_tammi)\
**Post date:** [June 27, 2025, 2:38pm UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/3 "2025-06-27T14:38:08Z")

</div>

Thanks Rain for the suggestion, below is the output for your suggested command.

Note:- removed IP address in this error message from safety perspective.

Jun 27 08:12:47 ip-.eu-central-1.compute.internal systemd[1]: Starting Elasticsearch...  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: java.lang.RuntimeException: starting java failed with [1]  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: output:  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: [0.000s][error][logging] Error opening log file '/var/log/elasticsear\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: [0.000s][error][logging] Initialization of output 'file=/var/log/elas\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: error:  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: Invalid -Xlog option '-Xlog:gc\*,gc+age=trace,safepoint:file=/var/log/\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: Error: Could not create the Java Virtual Machine.  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: Error: A fatal exception has occurred. Program will exit.  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.JvmOption.flagsFinal(JvmOptio\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.JvmOption.findFinalOptions(Jv\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.MachineDependentHeap.determin\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.JvmOptionsParser.jvmOptions(J\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.JvmOptionsParser.determineJvm\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.ServerCli.startServer(ServerC\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.j\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.common.cli.EnvironmentAwareCommand.execu\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Com\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.cli.Command.main(Command.java:54)  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd-entrypoint[2685]: at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLau\>  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Main process exited, code=exited, status=70/SOFTWARE  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Failed with result 'exit-code'.  
Jun 27 08:12:48 ip-.eu-central-1.compute.internal systemd[1]: Failed to start Elasticsearch.

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [June 27, 2025, 3:04pm UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/4 "2025-06-27T15:04:25Z")

</div>

> [@venkat\_tammi](#):
>
> Invalid -Xlog option

Looks like a problem? Did you change this from the default ? Permissions ?

I’m not sure if journalctl output is getting cut somehow, pipe to cat and check. Sometimes it decides your terminal is only N chars wide and chomps the rest of the lines.

---

<div class="post-metadata">

**Author:** ![venkat\_tammi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkat_tammi/32/143884_2.png) [@venkat\_tammi](https://discuss.elastic.co/u/venkat_tammi)\
**Post date:** [June 30, 2025, 10:20am UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/5 "2025-06-30T10:20:38Z")

</div>

Now, you can see full details .

However, as per today experience, **elasticsearch didn't come up post modification of /var/log/elasticsearch path to desired location.**

# cat journalctl.output\_30062025.txt

-- Logs begin at Mon 2025-06-30 06:48:57 UTC, end at Mon 2025-06-30 09:55:27 UTC. --  
Jun 30 06:49:04 ip-.eu-central-1.compute.internal systemd[1]: Starting Elasticsearch...  
Jun 30 06:49:29 ip-.eu-central-1.compute.internal systemd[1]: Started Elasticsearch.  
Jun 30 09:48:42 ip-.eu-central-1.compute.internal systemd[1]: Stopping Elasticsearch...  
Jun 30 09:48:43 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Succeeded.  
Jun 30 09:48:43 ip-.eu-central-1.compute.internal systemd[1]: Stopped Elasticsearch.  
Jun 30 09:54:06 ip-.eu-central-1.compute.internal systemd[1]: Starting Elasticsearch...  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: java.lang.RuntimeException: starting java failed with [1]  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: output:  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: [0.000s][error][logging] Error opening log file '/var/log/elasticsearch/vfdest.log': No such file or directory  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: [0.000s][error][logging] Initialization of output 'file=/var/log/elasticsearch/vfdest.log' using options 'filecount=32,filesize=64m' failed.  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: error:  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: Invalid -Xlog option '-Xlog:gc\*,gc+age=trace,safepoint:file=/var/log/elasticsearch/vfdest.log:utctime,level,pid,tags:filecount=32,filesize=64m', see error log for details.  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: Error: Could not create the Java Virtual Machine.  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: Error: A fatal exception has occurred. Program will exit.  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.JvmOption.flagsFinal(JvmOption.java:121)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.JvmOption.findFinalOptions(JvmOption.java:88)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.MachineDependentHeap.determineHeapSettings(MachineDependentHeap.java:56)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:146)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.JvmOptionsParser.determineJvmOptions(JvmOptionsParser.java:98)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.ServerCli.startServer(ServerCli.java:268)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.java:111)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:55)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:101)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.cli.Command.main(Command.java:54)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:65)  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Main process exited, code=exited, status=70/SOFTWARE  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd[1]: elasticsearch.service: Failed with result 'exit-code'.  
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd[1]: Failed to start Elasticsearch.

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [June 30, 2025, 10:48am UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/6 "2025-06-30T10:48:10Z")

</div>

Hello @venkat_tammi

As per the error message shared , could be issue with jvm.options files. you should share the elasticsearch.yml , jvm.options file so that anyone will be able to guide you further.

```auto
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: error:
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/vfdest.log:utctime,level,pid,tags:filecount=32,filesize=64m', see error log for details.
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: **Error: Could not create the Java Virtual Machine.**
Jun 30 09:54:07 ip-.eu-central-1.compute.internal systemd-entrypoint[2727]: Error: A fatal exception has occurred. Program will exit.

```

> [@Error while installing offline Elasticsearch 7.12](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/3):
>
> this is defiantly java setting problem. check this setting in jvm.options JVM temporary directory -Djava.io.tmpdir=${ES\_TMPDIR} you also need to enable this as you are using java16 14-:-XX:+UseG1GC 14-:-XX:G1ReservePercent=25 14-:-XX:InitiatingHeapOccupancyPercent=30 it clearly says it can't create jva virtual machine. may be try full path for logs/gc.log

Thanks!!

---

<div class="post-metadata">

**Author:** ![venkat\_tammi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkat_tammi/32/143884_2.png) [@venkat\_tammi](https://discuss.elastic.co/u/venkat_tammi)\
**Post date:** [July 2, 2025, 4:16am UTC](https://discuss.elastic.co/t/not-able-to-start-elasticsearch-post-customization-to-modify-default-paths/379560/7 "2025-07-02T04:16:15Z")

</div>

Thank you Rain and Tortoise for your valuable inputs. Finally, this issue got conclusion after modifying jvm.options and log4j2.properties files to write the logs at desired location.
