Hi All,
It seems to a loop which cannot stop when logstash would like to write incorrect data to mongo, even I did 'service logstash restart', the logstash started and then start to try send the incorrect data
My data process. logstash > kafka > logstash > elasticsearch, mongo
grep logstash process, cannot kill 18528 and et al
logstash 18258 2.0 4.0 4081932 325384 pts/0 SNl 15:12 0:46 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=/var/lib/logstash -Xmx500m -Xss2048k -Djffi.boot.library.path=/opt/logstash/vendor/jruby/lib/jni -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=/var/lib/logstash -Xbootclasspath/a:/opt/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/opt/logstash/vendor/jruby -Djruby.lib=/opt/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /opt/logstash/lib/bootstrap/environment.rb logstash/runner.rb agent -f /etc/logstash/conf.d -l /var/log/logstash/logstash.log
logstash 18365 2.6 3.8 4081948 311148 pts/0 SNl 15:23 0:43 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=/var/lib/logstash -Xmx500m -Xss2048k -...
logstash setting
input {
kafka {
topic_id => "neptunus"
zk_connect => "zookeeper4kafka:2181"
type => "test"
}
}
output {
stdout { codec => rubydebug }
elasticsearch {
host => "140.92.25.59"
codec => "json"
protocol => "http"
index => "logstash-%{+YYYY.MM.dd}"
}
mongodb {
uri => "mongodb://mongo4kafka"
database => kafkatest
collection => hellomongo
codec => "json"
}
mongodb {
uri => "mongodb://mongo264kafka"
database => kafkatest
collection => hellomongo
codec => "json"
}
}
Following message print continuously
{:timestamp=>"2015-10-15T15:38:26.293000+0800", :message=>"Failed to send event to MongoDB", :event=>#<LogStash::Event:0x24f2ce5c @metadata_accessors=#<LogStash::Util::Accessors:0x4e4fecf4 @store={"retry_count"=>0}, @lut={}>, @cancelled=false, @data={"message"=>"{a:22,"name":"franky"}", "@version"=>"1", "@timestamp"=>"2015-10-15T07:32:04.468Z", "host"=>"logstashpubkafka", "path"=>"/var/log/kafka/test", "type"=>"test", "tags"=><Java::JavaUtil::ArrayList:89942749 ["_jsonparsefailure"]>}, @metadata={"retry_count"=>0}, @accessors=#<LogStash::Util::Accessors:0x23f04235 @store={"message"=>"{a:22,"name":"franky"}", "@version"=>"1", "@timestamp"=>"2015-10-15T07:32:04.468Z", "host"=>"logstashpubkafka", "path"=>"/var/log/kafka/test", "type"=>"test", "tags"=><Java::JavaUtil::ArrayList:89942749 ["_jsonparsefailure"]>}, @lut={"type"=>[{"message"=>"{a:22,"name":"franky"}", "@version"=>"1", "@timestamp"=>"2015-10-15T07:32:04.468Z", "host"=>"logstashpubkafka", "path"=>"/var/log/kafka/test", "type"=>"test", "tags"=><Java::JavaUtil::ArrayList:89942749 ["_jsonparsefailure"]>}, "type"], "@timestamp"=>[{"message"=>"{a:22,"name":"franky"}", "@version"=>"1", "@timestamp"=>"2015-10-15T07:32:04.468Z", "host"=>"logstashpubkafka", "path"=>"/var/log/kafka/test", "type"=>"test", "tags"=><Java::JavaUtil::ArrayList:89942749 ["_jsonparsefailure"]>}, "@timestamp"]}>>, :exception=>#<NoMethodError: undefined method
bson_type' for <Java::JavaUtil::ArrayList:89942749 ["_jsonparsefailure"]>:Java::JavaUtil::ArrayList>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/hash.rb:44:in
to_bson'", "org/jruby/RubyHash.java:1341:ineach'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/hash.rb:43:in
to_bson'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/encodable.rb:57:inencode_with_placeholder_and_null'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/hash.rb:42:in
to_bson'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/array.rb:49:into_bson'", "org/jruby/RubyArray.java:1613:in
each'", "org/jruby/RubyEnumerable.java:978:ineach_with_index'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/array.rb:46:in
to_bson'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/encodable.rb:57:in `encode_with_placeholder_and_null'",