Logstash setting up a standalone Java environment

Source: Internet
Author: User
Tags logstash

Tag: Error Str instr cal failed to start. Lib led Moni 1.3

Because the production environment requires a set of elk environment, but the log collector program Logstash need to rely on the corresponding version of the JDK environment, the specific version depends on the download prompt, prompted as follows:

Https://www.elastic.co/downloads/logstash
Version:6.1.3release date:january 30, 2018notes:view detailed release notes. Not the version you ' re looking for? view past releases. java 8 is required for logstash 6.x and 5.x. You can see the need to rely on Java 8 environment. However, in the production system, has been deployed jdk1.7 environment, and can not easily change, if not configured Java 8, will start failure, the error message is as follows: [[email protected] bin]# /opt/ Logstash-5.2.0/bin/logstash -eloaderror: jruby ext built for wrong java  version in  ' Com.purbon.jrmonitor.JRMonitorService ':  java.lang.unsupportedclassversionerror: com/purbon/jrmonitor/jrmonitorservice : unsupported  major.minor version 52.0  require at org/jruby/RubyKernel.java:1040     (Root)  at /opt/logstash-5.2.0/vendor/bundle/jruby/1.9/gems/jrmonitor-0.4.2/lib/ jrmonitor.rb:4  require at org/jruby/rubykernel.java:1040    (Root)  at /opt/logstash-5.2.0/logstash-core/lib/logstash/instrument/periodic_poller/jvm.rb:1   require at org/jruby/RubyKernel.java:1040    (Root)  at /opt/ logstash-5.2.0/logstash-core/lib/logstash/instrument/periodic_poller/jvm.rb:5  require at  org/jruby/rubykernel.java:1040    (Root)  at /opt/logstash-5.2.0/logstash-core/lib/ logstash/instrument/periodic_pollers.rb:1  require at org/jruby/rubykernel.java:1040     (Root)  at /opt/logstash-5.2.0/logstash-core/lib/logstash/instrument/periodic_pollers.rb :3  require at org/jruby/rubykernel.java:1040    (Root)  at /opt/ LOGSTASH-5.2.0/LIB/BOOTSTRAP/ENVIRONMENT.RB:70 therefore need to configure a separate Java environment for Logstash, only need to configure the Java environment in the following two configuration files, respectively:export  java_home=/usr/local/jdk1.81, ~/logstash-5.2.0/bin/logstash2, ~/logstash-5.2.0/bin/logstash.lib.sh


Logstash setting up a standalone Java environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.