Logstash 7.2.0 install error

I was upgrading whole stack to 7.2.0 and got following error

Updating / installing...
1:logstash-1:7.2.0-1 ################################# [ 17%]
Using provided startup.options file: /etc/logstash/startup.options
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unable to install system startup script for Logstash.

but rpm -qa says it is installed

rpm -qa |grep logsta

logstash-7.2.0-1.noarch

Getting following error in logstash for all jdbc

Failed to load /usr/lib/oracle/12.2/client64/lib/ojdbc8.jar {:exception=>#<TypeError: failed to coerce jdk.internal.loader.ClassLoaders$AppClassLoader to java.net.URLClassLoader

That is a known issue. Read down to the end of the thread for additional issues.

The unrecognized VM option error suggests you are using a JRE that is not supported.

OK fixed it.
just incase putting it here incase someone came across same

in logstash conf dir, jvm.options file do this
#-XX:+UseParNewGC ------> comment this
#-XX:+UseConcMarkSweepGC ------> comment this
-XX:+UseG1GC ----> Add this line

copy your original jar file to logstash jar dir. or you can create a link there.

# cp /usr/lib/oracle/12.2/client64/lib/ojdbc8.jar /usr/share/logstash/logstash-core/lib/jars/

1 Like

@Badger, I just upgraded java and elk stack

java -version

java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

Do you think I got wrong java? But this was only problem with jdbc and everything else is working fine

Java 12 is not supported. That does not necessarily mean anything will fail.

ok. I guess will keep that java until it fails and
use jdbc8 in to /usr/share/logstash/logstash-core/lib/jars dir to keep this going

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

solved my issue. Thank you for sharing!