Elasticsearch 7.8 is upgraded to version 7.17.9, then unable to start the service.
And in logs getting following Error: Exception in thread "main" java.lang.RuntimeException: starting java.
Java - version :
openjdk version "1.8.0_362"
OpenJDK Runtime Environment Corretto-8.362.08.1 (build 1.8.0_362-b08)
OpenJDK 64-Bit Server VM Corretto-8.362.08.1 (build 25.362-b08, mixed mode)
Hi @kirankumarb
What installation method?
Did you run?
sudo /bin/systemctl daemon-reload
Please show the whole startup log not just one line, perhaps we can help
Hi @stephenb
- We have used this command to update to 7.17.9 :
sudo yum upgrade elasticsearch -y - No we have not run the sudo /bin/systemctl daemon-reload command
-Logs:
Apr 24 10:03:55 systemd[1]: Started Elasticsearch.
Apr 24 10:03:57 elasticsearch[11406]: Exception in thread "main" java.lang.RuntimeException: starting java
Apr 24 10:03:57 elasticsearch[11406]: output:
Apr 24 10:03:57 elasticsearch[11406]: error:
Apr 24 10:03:57 elasticsearch[11406]: Unrecognized VM option 'UseConcMarkSweepGC'
Apr 24 10:03:57 elasticsearch[11406]: Error: Could not create the Java Virtual Machine.
Apr 24 10:03:57 elasticsearch[11406]: Error: A fatal exception has occurred. Program will exit.
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmO
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonom
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(Jvm
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOption
Apr 24 10:03:57 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Apr 24 10:03:57 systemd[1]: Unit elasticsearch.service entered failed state.
Apr 24 10:03:57 systemd[1]: elasticsearch.service failed.
Are you sure you are not running the bundled JDK with an
openjdk 19.0.2 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-44)
OpenJDK 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)
Perhaps you have old jvm.options file or bad setting looks like perhaps it did not get updated.
Seems like you are running into the below read the comments in the GC Section
$ cat jvm.options
################################################################
##
## JVM configuration
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/jvm-options.html
## for more information.
##
################################################################
....
################################################################
## Expert settings
################################################################
##
## All settings below here are considered expert settings. Do
## not adjust them unless you understand what you are doing. Do
## not edit them in this file; instead, create a new file in the
## jvm.options.d directory containing your adjustments.
##
################################################################
## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly
## G1GC Configuration. <!----- HERE
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10-13:-XX:-UseConcMarkSweepGC
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
14-:-XX:+UseG1GC
...
-Yes, I'm now able to start the service after adding 8-13 in GC Configuration. Thank you for the solution
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.