Error starting logstash

Im using this command to start logstash:

$ bin/logstash -f logstash-config/02-beats-input.conf -f logstash-config/10-syslog-filter.conf -f logstash-config/30-elasticsearch-output.conf

Logstash gives this error.

NameError: cannot link Java class org.apache.logging.log4j.Level JVMCFRE003 bad major version; class=org/apache/logging/log4j/Level, offset=6
get_proxy_or_package_under_package at org/jruby/javasupport/JavaUtilities.java:54
method_missing at file:/data/sw/logstash-5.5.2/vendor/jruby/lib/jruby.jar!/jruby/java/java_package_module_template.rb:14
Logging at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/logging/logger.rb:6
LogStash at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/logging/logger.rb:5
(root) at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/logging/logger.rb:4
require at org/jruby/RubyKernel.java:1040
(root) at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/util/loggable.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/util/loggable.rb:2
require at org/jruby/RubyKernel.java:1040
(root) at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/settings.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /data/sw/logstash-5.5.2/logstash-core/lib/logstash/settings.rb:2
require at org/jruby/RubyKernel.java:1040
(root) at /data/sw/logstash-5.5.2/lib/bootstrap/environment.rb:70

Can you guys please help? Thanks.

Can you please run java -version and post the output here?

Thanks I fixed the problem. The Java version was 1.6, fixed the JAVA_HOME & PATH variables and got it working.

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