Error starting Logstash 1.5.0RC1 with Elasticsearch output (node and transport)
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)
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
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.
@dustinconrad thanks for reporting the issue. We are working to release RC2 with this fix as soon as possible
Fixed and released RC2
So is there a workaround for this when you've installed via package?
@Seanmcn can you update to RC2? we released deb packages which fixes this issue. No need for the workaround anymore
@suyograo ~~I'm on Version: 1.5.0.rc2-1 and getting this issue.~~
Edit: My apologies, Java version problem!
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
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.
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.