Hi, I'm new to elastic and was trying to get Logstash working on my RHEL 6.8 server. The Java I have installed is (openjdk version "1.8.0_111") however when I try running the "/usr/share/logstash/bin/logstash -e 'input { stdin { } } output { stdout {} }'" as instructed to do so in the "getting started" documentation I get the following error message:
/etc/logstash # /usr/share/logstash/bin/logstash -e 'input { stdin { } } output { stdout {} }'
NameError: cannot link Java class org.apache.logging.log4j.Level needs Java 7 (java.lang.UnsupportedClassVersionError: org/apache/logging/log4j/Level : Unsupported major.minor version 51.0)
get_proxy_or_package_under_package at org/jruby/javasupport/JavaUtilities.java:54
method_missing at file:/usr/share/logstash/vendor/jruby/lib/jruby.jar!/jruby/java/java_package_module_template.rb:14
Logging at /usr/share/logstash/logstash-core/lib/logstash/logging/logger.rb:6
LogStash at /usr/share/logstash/logstash-core/lib/logstash/logging/logger.rb:5
(root) at /usr/share/logstash/logstash-core/lib/logstash/logging/logger.rb:4
require at org/jruby/RubyKernel.java:1040
(root) at /usr/share/logstash/logstash-core/lib/logstash/util/loggable.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /usr/share/logstash/logstash-core/lib/logstash/util/loggable.rb:2
require at org/jruby/RubyKernel.java:1040
(root) at /usr/share/logstash/logstash-core/lib/logstash/settings.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /usr/share/logstash/logstash-core/lib/logstash/settings.rb:2
require at org/jruby/RubyKernel.java:1040
(root) at /usr/share/logstash/lib/bootstrap/environment.rb:70
I was able to successfully install ElasticSearch and Kibana but just need a little direction on getting Logstash to work.
Thanks!
Mo
2/21/2017
So I was able to fix this issue. I had to basically point my JAVA_HOME variable in my .bash_profile to to point to JAVA version 6 or higher
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0/