# Error while installing offline Elasticsearch 7.12

**URL:** <https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659>\
**Category:** Elasticsearch\
**Created:** [June 22, 2021, 1:44pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659 "2021-06-22T13:44:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamind/32/4866_2.png) [@BenjaminD](https://discuss.elastic.co/u/BenjaminD)\
**Post date:** [June 22, 2021, 1:44pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/1 "2021-06-22T13:44:47Z")

</div>

Hi everyone.  
I'm trying to install Elasticsearch 7.12.1 on a server for a customer.  
The OS is Ubuntu Server 9.3.0-17 aka 20.04 (the LTS one).  
OpenJDK 16 included.  
This server is offline so I downloaded the deb package : elasticsearch-7.12.1-amd64.deb  
I installed it accoding to the following documentation : [Install Elasticsearch with Debian Package | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/deb.html#install-deb)  
I then copied my version of elasticsearch.yml to /etc/elastic/ folder.  
Everything works fine until reaching the "Running with systemd" section.  
When I tried to run `sudo systemctl start elasticsearch.service`, an error occured.  
First, it told me jvm.options was missing.  
I found it from the elasticsearch-7.12.1-linux-x86\_64.tar.gz archive and copied it with a `sudo cp jvm.options /etc/elastic/jvm.options`  
After that, I had another error :

```auto
Jun 22 15:39:31 hbcyslo001 systemd[1]: Starting Elasticsearch...
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: output:
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: [0.000s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: [0.000s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed>
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: error:
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: 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.
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: Error: Could not create the Java Virtual Machine.
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: Error: A fatal exception has occurred. Program will exit.
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.java:119)
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmOption.java:81)
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:38)
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135)
Jun 22 15:39:34 hbcyslo001 systemd-entrypoint[1977]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
Jun 22 15:39:34 hbcyslo001 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 15:39:34 hbcyslo001 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Jun 22 15:39:34 hbcyslo001 systemd[1]: Failed to start Elasticsearch.

```

I checked, this gc.log file does not exist.  
I tried to perform a chmod 777 on the log folder, without any incidence.  
This is kind of urgent for me : This was a test for my customer to show him how powerful the stack is and I'm stuck.  
Can anybody help me please ? 🙏

---

<div class="post-metadata">

**Author:** ![casquero](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@casquero](https://discuss.elastic.co/u/casquero)\
**Post date:** [June 22, 2021, 1:46pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/2 "2021-06-22T13:46:49Z")

</div>

Did you try to increase the java options for memory? Seems that you have the ones from default, recommended is 4gb

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [June 22, 2021, 1:50pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/3 "2021-06-22T13:50:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BenjaminD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamind/32/4866_2.png) [@BenjaminD](https://discuss.elastic.co/u/BenjaminD)\
**Post date:** [June 22, 2021, 2:01pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/4 "2021-06-22T14:01:07Z")

</div>

I tried it but no change

---

<div class="post-metadata">

**Author:** ![BenjaminD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamind/32/4866_2.png) [@BenjaminD](https://discuss.elastic.co/u/BenjaminD)\
**Post date:** [June 22, 2021, 2:14pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/5 "2021-06-22T14:14:33Z")

</div>

Yes !  
That was it (the gc.log path).  
Thanks a lot ! 🤩

---

<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:** [July 20, 2021, 2:15pm UTC](https://discuss.elastic.co/t/error-while-installing-offline-elasticsearch-7-12/276659/6 "2021-07-20T14:15:03Z")

</div>

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