We're updating the issue view to help you get more done. 

Mongodb output plugin causes elasticsearch output plugin to fail

Description

I'm getting this just now.

conf file:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 input { syslog { port => 10513 host => "127.0.0.1" use_labels => false } } filter { json { source => "message" } if [ver] != "0.2" { drop {} } mutate { remove_field => [ "message", "@version", "timestamp", "host", "priority", "program", "pid", "severity", "facility", "tags"] } date { match => [utc, "ISO8601"] } } output { mongodb { isodate => true collection => "recorder" database => "logs" uri => "mongodb://127.0.0.1" } elasticsearch { node_name => "logstash-output" codec => json host => localhost index => "recorder-%{+YYYY.MM.dd}" } }

Everything works if I comment out the mongodb's "isodate => true"

If I don't do that I get:

1 {:timestamp=>"2014-05-08T01:37:43.717000+0000", :message=>"Failed to flush outgoing items", :outgoing_count=>123, :exception=>java.lang.ClassCastException: org.jruby.RubySymbol cannot be cast to java.lang.String, :backtrace=>["org.elasticsearch.common.xcontent.XContentBuilder.writeMap(org/elasticsearch/common/xcontent/XContentBuilder.java:1095)", "org.elasticsearch.common.xcontent.XContentBuilder.map(org/elasticsearch/common/xcontent/XContentBuilder.java:1015)", "org.elasticsearch.action.index.IndexRequest.source(org/elasticsearch/action/index/IndexRequest.java:335)", "org.elasticsearch.action.index.IndexRequest.source(org/elasticsearch/action/index/IndexRequest.java:324)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:597)", "RUBY.build_request(/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:217)", "RUBY.bulk(/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:205)", "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)", "RUBY.bulk(/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:204)", "RUBY.flush(/opt/logstash/lib/logstash/outputs/elasticsearch.rb:331)", "Stud::Buffer.buffer_flush(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:219)", "Stud::Buffer.buffer_flush(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:219)", "org.jruby.RubyHash.each(org/jruby/RubyHash.java:1339)", "Stud::Buffer.buffer_flush(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:216)", "Stud::Buffer.buffer_flush(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:216)", "Stud::Buffer.buffer_flush(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:193)", "Stud::Buffer.buffer_flush(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:193)", "Stud::Buffer.buffer_receive(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:159)", "Stud::Buffer.buffer_receive(/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:159)", "LogStash::Outputs::ElasticSearch.receive(/opt/logstash/lib/logstash/outputs/elasticsearch.rb:327)", "LogStash::Outputs::ElasticSearch.receive(/opt/logstash/lib/logstash/outputs/elasticsearch.rb:327)", "LogStash::Outputs::Base.handle(/opt/logstash/lib/logstash/outputs/base.rb:86)", "LogStash::Outputs::Base.handle(/opt/logstash/lib/logstash/outputs/base.rb:86)", "RUBY.initialize((eval):93)", "org.jruby.RubyProc.call(org/jruby/RubyProc.java:271)", "LogStash::Pipeline.output(/opt/logstash/lib/logstash/pipeline.rb:266)", "LogStash::Pipeline.output(/opt/logstash/lib/logstash/pipeline.rb:266)", "RUBY.outputworker(/opt/logstash/lib/logstash/pipeline.rb:225)", "RUBY.start_outputs(/opt/logstash/lib/logstash/pipeline.rb:152)", "java.lang.Thread.run(java/lang/Thread.java:662)"], :level=>:warn}

This is with latest elasticsearch 1.1.1 and logstash 1.4.1-1-bd507eb (from repo)

1 2 deb http://packages.elasticsearch.org/logstash/1.4/debian stable main deb http://packages.elasticsearch.org/elasticsearch/1.1/debian stable main

Environment

None

Status

Assignee

Logstash Developers

Reporter

Mattias Fornander

Affects versions

1.4.1 (bugfix only)

Priority