logstash icon indicating copy to clipboard operation
logstash copied to clipboard

Error starting Logstash 1.5.0RC1 with Elasticsearch output (node and transport)

Open dustinconrad opened this issue 11 years ago • 10 comments

I'm currently experimenting with an ELK stack, so this may be user error.

I have setup elasticsearch and logstash in docker containers with a very basic configuration. When using logstash 1.4.2, everything is working fine.

My current configuration is split into 3 files in a directory: file 1:

input { 
    stdin { } 
} 

file 2: empty file 3:

output { 
    stdout { 
        codec => rubydebug 
    }
    elasticsearch {
      host => "elasticsearch"
      port => "9300"
  }
}

When I startup logstash, I get

The error reported is:
  missing class or uppercase package name (`org.elasticsearch.common.settings.ImmutableSettings'), caused by (NameError) cannot load Java class org.elasticsearch.common.settings.ImmutableSettings

The java version on both boxes:

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

dustinconrad avatar Mar 05 '15 23:03 dustinconrad

Confirmed.

% bin/logstash version
logstash 1.5.0.rc1.1
% bin/logstash -e 'output { elasticsearch { } }'
The error reported is:
  missing class or uppercase package name (`org.elasticsearch.common.settings.ImmutableSettings'), caused by (NameError) cannot load Java class org.elasticsearch.common.settings.ImmutableSettings

jordansissel avatar Mar 05 '15 23:03 jordansissel

WORKAROUND

The workaround for this bug is to reinstall the logstash-output-elasticsearch plugin:

Here's how to reproduce the error:

% bin/logstash -e 'output { elasticsearch { } }'
The error reported is:
  missing class or uppercase package name (`org.elasticsearch.common.settings.ImmutableSettings'), caused by (NameError) cannot load Java class org.elasticsearch.common.settings.ImmutableSettings

Here is the workaround:

% bin/plugin uninstall logstash-output-elasticsearch
% bin/plugin install logstash-output-elasticsearch

Verification of fix:

% bin/logstash -e 'output { elasticsearch { } }'
...
INFO: [logstash-ds4172-30678-15518] started
Logstash startup completed

This will reinstall the elasticsearch output and fix the problem. This is a bug in the build process we used to make the release.

jordansissel avatar Mar 05 '15 23:03 jordansissel

@dustinconrad thanks for reporting the issue. We are working to release RC2 with this fix as soon as possible

suyograo avatar Mar 06 '15 09:03 suyograo

Fixed and released RC2

suyograo avatar Mar 06 '15 19:03 suyograo

So is there a workaround for this when you've installed via package?

seanmcn avatar Mar 26 '15 18:03 seanmcn

@Seanmcn can you update to RC2? we released deb packages which fixes this issue. No need for the workaround anymore

suyograo avatar Mar 26 '15 18:03 suyograo

@suyograo ~~I'm on Version: 1.5.0.rc2-1 and getting this issue.~~

Edit: My apologies, Java version problem!

seanmcn avatar Mar 26 '15 18:03 seanmcn

I'm getting the exact same issue. Java version 8 on Logstash 1.5. I've followed this workaround and am still getting the issue.

Administrators-MacBook-Pro-4:logstash-1.5.0 administrator$ ./bin/logstash version logstash 1.5.0 Administrators-MacBook-Pro-4:logstash-1.5.0 administrator$ ./bin/logstash -e 'output { elasticsearch {} }' The error reported is: missing class or uppercase package name (`org.elasticsearch.common.settings.ImmutableSettings'), caused by (NameError) cannot link Java class org.elasticsearch.common.settings.ImmutableSettings, probable missing dependency: org/elasticsearch/common/settings/ImmutableSettings : Unsupported major.minor version 51.0

rothwm avatar Jun 15 '15 13:06 rothwm

Using Debian 7 and the latest deb package 1.5.1 of Logstash, I still have this issue when the service start.

I'm using openjdk-7-jdk. I can provide more info if needed.

Zedoki avatar Jun 19 '15 08:06 Zedoki

I got this error after upgrading and it turned out because I was still (unintentionally) using Java 6. Update to Java 7/8 and everything was fine.

markvr avatar Jul 23 '15 15:07 markvr