# ES 7.3.2 on CentOS: JvmOptionsParser - cannot resolve ES\_TMPDIR

**URL:** <https://discuss.elastic.co/t/es-7-3-2-on-centos-jvmoptionsparser-cannot-resolve-es-tmpdir/201076>\
**Category:** Elasticsearch\
**Created:** [September 25, 2019, 3:27pm UTC](https://discuss.elastic.co/t/es-7-3-2-on-centos-jvmoptionsparser-cannot-resolve-es-tmpdir/201076 "2019-09-25T15:27:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [September 25, 2019, 3:27pm UTC](https://discuss.elastic.co/t/es-7-3-2-on-centos-jvmoptionsparser-cannot-resolve-es-tmpdir/201076/1 "2019-09-25T15:27:41Z")

</div>

I'm trying to spin up multiple ES instances on a server, this used to work with ES 6.x, but does not work with the recent version:

```auto
ES_LOCAL_PORT=9100

export ES_PATH_CONF=${HOME}/etc/elasticsearch1
export ES_JAVA_OPTS="-Xms128m -Xmx128m"

elasticsearch \
        -Enode.name=node${ES_LOCAL_PORT} \
        -Epath.data=${HOME}/data/elasticsearch${ES_LOCAL_PORT} \
        -Epath.logs=${HOME}/logs/elasticsearch${ES_LOCAL_PORT} \
        -Ehttp.port=${ES_LOCAL_PORT} \
        -Etransport.port=1${ES_LOCAL_PORT}

```

I took the standard `jvm.options` and replaced the paths to GC files:

```
$ grep ES_TMPDIR "${HOME}/etc/elasticsearch1/jvm.options"

```

```auto
-Djava.io.tmpdir=${ES_TMPDIR}
-XX:HeapDumpPath=${ES_TMPDIR}
-XX:ErrorFile=${ES_TMPDIR}/hs_err_pid%p.log
8:-Xloggc:${ES_TMPDIR}/gc.log
9-:-Xlog:gc*,gc+age=trace,safepoint:file=${ES_TMPDIR}/gc.log:utctime,pid,tags:filecount=32,filesize=64m

```

And the `JvmOptionsParser` from the ES start script cannot resolve the variable anymore:

```auto
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.000s][error][logging] Error opening log file '${ES_TMPDIR}/gc.log': No such file or directory
[0.000s][error][logging] Initialization of output 'file=${ES_TMPDIR}/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=${ES_TMPDIR}/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(JvmErgonomics.java:79)
        at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)

```

Again, it worked for ES 6.x.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 26, 2019, 7:18am UTC](https://discuss.elastic.co/t/es-7-3-2-on-centos-jvmoptionsparser-cannot-resolve-es-tmpdir/201076/2 "2019-09-26T07:18:51Z")

</div>

can you open a github issue for this one, please? If it worked on 6.x this feels like a bug to me.

As a workaround for now, you can probably just hardcode the path in the gc log configuration line.

---

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [September 26, 2019, 9:45am UTC](https://discuss.elastic.co/t/es-7-3-2-on-centos-jvmoptionsparser-cannot-resolve-es-tmpdir/201076/3 "2019-09-26T09:45:56Z")

</div>

I've opened already: [https://github.com/elastic/elasticsearch/issues/47133](https://github.com/elastic/elasticsearch/issues/47133)  
as a workaround I just commented the line out, because I don't want many instances to be writing into the same file (`jvm.options` is shared) 🙂

---

<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:** [October 24, 2019, 9:46am UTC](https://discuss.elastic.co/t/es-7-3-2-on-centos-jvmoptionsparser-cannot-resolve-es-tmpdir/201076/4 "2019-10-24T09:46:07Z")

</div>

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