Unable to perform elasticsearch within filter plugin

Description

---------------------------------------------------------

An unexpected error occurred. This is probably a bug.

You can find help with this problem in a few places:

 

  • chat: #logstash IRC channel on freenode irc.

IRC via the web: http://goo.gl/TI4Ro

  • email: logstash-users@googlegroups.com

 

---------------------------------------------------------
The error reported is:
superclass mismatch for class Request

Activity

Show:
Frezer Kifle
January 27, 2014, 5:28 PM

The issue appears to be with the following on the attached frezer.conf:
elasticsearch {
query => "message:Received Artifact."
fields => ["@timestamp", "started"]
}

Can one not perform this within the "filter" plugin?

Frezer Kifle
January 27, 2014, 5:42 PM

I am using ver. 1.3.3 and I used ver 1.3.2.

I am trying to following example found at http://logstash.net/docs/1.3.3/filters/elasticsearch#hosts:
if [type] == "end" {
elasticsearch {
hosts => ["es-server"]
query => "type:start AND operation:%{[opid]}"
fields => ["@timestamp", "started"]
}

date {
match => ["[started]", "ISO8601"]
target => "[started]"
}

ruby {
code => "event['duration_hrs'] = (event['@timestamp'] - event['started']) / 3600 rescue nil"
}
}

Frezer Kifle
January 28, 2014, 6:28 PM

For what it is worth, here is a little more "stacktrace" :

---------------------------------------------------------

An unexpected error occurred. This is probably a bug.

You can find help with this problem in a few places:

 

  • chat: #logstash IRC channel on freenode irc.

IRC via the web: http://goo.gl/TI4Ro

  • email: logstash-users@googlegroups.com

 

---------------------------------------------------------
The error reported is:
superclass mismatch for class Request
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday/request.rb:12:in `Faraday'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday/request.rb:1:in `(root)'
org/jruby/RubyKernel.java:1084:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/logstash/JRUBY-6970.rb:27:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/polyglot.rb:63:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:1:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:16:in `require_libs'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:15:in `require_libs'
org/jruby/RubyKernel.java:1084:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/logstash/JRUBY-6970.rb:27:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/polyglot.rb:63:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday/connection.rb:6:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:1:in `(root)'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:16:in `require_libs'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:15:in `require_libs'
org/jruby/RubyKernel.java:1084:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/logstash/JRUBY-6970.rb:27:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/polyglot.rb:63:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:129:in `Faraday'
org/jruby/RubyKernel.java:1084:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/logstash/JRUBY-6970.rb:27:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/polyglot.rb:63:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/faraday.rb:1:in `(root)'
org/jruby/RubyKernel.java:1084:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/logstash/JRUBY-6970.rb:27:in `require'
file:/opt/logstash/logstash-1.3.3-flatjar.jar!/polyglot.rb:63:in `require'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/elasticsearch/transport.rb:1:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/elasticsearch/transport.rb:4:in `(root)'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/elasticsearch.rb:1:in `(root)'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/elasticsearch.rb:3:in `(root)'
logstash/runner.rb:201:in `run'
org/jruby/RubyProc.java:271:in `call'
jar:file:/opt/logstash/logstash-1.3.3-flatjar.jar!/logstash/filters/elasticsearch.rb:1:in `(root)'

Roman Valls
February 4, 2014, 2:16 PM
Edited

It does not work for me eiither. I am also using logstash 1.3.3 running under OSX Mavericks. I am using the following configuration file:

https://gist.github.com/brainstorm/6552989

Philippe Weber
March 19, 2015, 4:58 AM

Closing old issue related to flatjar packaging.
Losgtash 1.4.x and 1.5.x are now using tarball release.
If issue reoccurs with tarball release please fill an issue on github https://github.com/elastic/logstash/issues

Assignee

Logstash Developers

Reporter

Frezer Kifle

Labels

None

Affects versions

Configure