# Problem upgrading to 7.12.1

**URL:** <https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353>\
**Category:** Elasticsearch\
**Created:** [May 18, 2021, 11:52pm UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353 "2021-05-18T23:52:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry\_Hoffmeister](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jerry\_Hoffmeister](https://discuss.elastic.co/u/Jerry_Hoffmeister)\
**Post date:** [May 18, 2021, 11:52pm UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353/1 "2021-05-18T23:52:45Z")

</div>

Hi,  
I'm upgrading a single node, dev instance of elasticsearch running 6.4.2 to 7.12.1 as the first step in getting ready to upgrade our prod cluster. I was able to upgrade from 6.4.2 -\> 6.8.15 without issue but on upgrading to 7.12.1, I see this error on startup:

`May 18 15:36:01 ews-dev11 elasticsearch: could not find java in bundled JDK at /data/elasticsearch-sw/jdk/bin/java`

But:

```auto
bash-4.2# data/elasticsearch-sw/jdk/bin/java -version
openjdk version "16" 2021-03-16
OpenJDK Runtime Environment AdoptOpenJDK (build 16+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 16+36, mixed mode, sharing)

```

I did some research but wasn't able to get it to start using the bundled jdk. In my systemd startup script, I added:

`Environment=ES_JAVA_HOME=/`

Which makes it use the old, default java install on the box in /bin which of course results in this warning:

`May 18 16:13:24 ews-dev11 elasticsearch: Future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/java/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.`

This worked but I'd much prefer to use the bundled jdk

I'm running on a centos 7 server that's fairly well locked down and I have to run everything out of the /data directory on the box. elasticsearch-sw is a symlink to a directory (elasticsearch-sw -\> /data/bin/elasticsearch-7.12.1) where I unzipped elasticsearch install.

JAVA\_HOME is not set and prior to adding it, ES\_JAVA\_HOME wasn't being set in my systemd startup script.

What am I missing?

---

<div class="post-metadata">

**Author:** ![Jerry\_Hoffmeister](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jerry\_Hoffmeister](https://discuss.elastic.co/u/Jerry_Hoffmeister)\
**Post date:** [May 19, 2021, 12:04am UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353/2 "2021-05-19T00:04:50Z")

</div>

After posting my question, I thought it might be that the user running elasticsearch might not have access to the bundled jvm so I fixed the permissions and commented out the reference to ES\_JAVA\_HOME from my startup script but now I see this set of errors:

```auto
May 18 17:00:52 ews-dev11 elasticsearch: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
May 18 17:00:52 ews-dev11 elasticsearch: output:
May 18 17:00:52 ews-dev11 elasticsearch: error:
May 18 17:00:52 ews-dev11 elasticsearch: Unrecognized VM option 'UseConcMarkSweepGC'
May 18 17:00:52 ews-dev11 elasticsearch: Error: Could not create the Java Virtual Machine.
May 18 17:00:52 ews-dev11 elasticsearch: Error: A fatal exception has occurred. Program will exit.
May 18 17:00:52 ews-dev11 elasticsearch: at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.java:119)
May 18 17:00:52 ews-dev11 elasticsearch: at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmOption.java:81)
May 18 17:00:52 ews-dev11 elasticsearch: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:38)
May 18 17:00:52 ews-dev11 elasticsearch: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135)
May 18 17:00:52 ews-dev11 elasticsearch: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
May 18 17:00:52 ews-dev11 systemd: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
May 18 17:00:52 ews-dev11 systemd: Unit elasticsearch.service entered failed state.
May 18 17:00:52 ews-dev11 systemd: elasticsearch.service failed.

```

---

<div class="post-metadata">

**Author:** ![Jerry\_Hoffmeister](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jerry\_Hoffmeister](https://discuss.elastic.co/u/Jerry_Hoffmeister)\
**Post date:** [May 19, 2021, 12:16am UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353/3 "2021-05-19T00:16:51Z")

</div>

For which this:

> [@Elasticsearch won't start after 7.9.1 to 7.9.2 upgrade](https://discuss.elastic.co/t/elasticsearch-wont-start-after-7-9-1-to-7-9-2-upgrade/249878/2):
>
> I'm seeing the same thing on Ubuntu 18.04. A quick google of the error tells me it's related to this: Upgrades Infra/Packaging Upgrade the bundled JDK to JDK 15 [#62580](https://github.com/elastic/elasticsearch/pull/62580) UPDATE: So my automated approach of updating elasticsearch ignores any new versions of configuration files. Forcing reinstall using sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" elasticsearch gave me an updated jvm.options that solves the issue. Here's the diff: # diff jvm.options jvm…

appears to be the solution.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 19, 2021, 1:25am UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353/4 "2021-05-19T01:25:12Z")

</div>

> [@Jerry\_Hoffmeister](#):
>
> `Environment=ES_JAVA_HOME=/`

Shouldn't that be `/data/elasticsearch-sw/jdk`?

---

<div class="post-metadata">

**Author:** ![Jerry\_Hoffmeister](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jerry\_Hoffmeister](https://discuss.elastic.co/u/Jerry_Hoffmeister)\
**Post date:** [May 19, 2021, 2:14am UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353/5 "2021-05-19T02:14:24Z")

</div>

Is it always gonna be there? Shouldn't I just leave it unset so it will default to the bundled jvm? I think the initial problem was file permissions - I has unzipped the bits as root. I could also go with specifically setting to /data/elasticsearch-sw/jdk

---

<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:** [June 16, 2021, 2:15am UTC](https://discuss.elastic.co/t/problem-upgrading-to-7-12-1/273353/6 "2021-06-16T02:15:10Z")

</div>

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