org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `tv_sec' for ["2013-11-18T18:48:51.503Z", "2013-11-18T18:48:51.504Z"]:Array @40000000528a66c911da88a4 at LogStash::Event.sprintf(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/event.rb:226)

JIRA | Ryan Bellows | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I've been having some issues getting the multiline filter to be stable over time. It will run ok for a day or two, or even 5 minutes, then crashes with this error: {code} @40000000528a66c911ac3d14 Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `tv_sec' for ["2013-11-18T18:48:51.503Z", "2013-11-18T18:48:51.504Z"]:Array @40000000528a66c911da88a4 at LogStash::Event.sprintf(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/event.rb:226) @40000000528a66c911da9074 at org.jruby.RubyString.gsub(org/jruby/RubyString.java:3065) @40000000528a66c911da9074 at LogStash::Event.sprintf(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/event.rb:212) @40000000528a66c911dac724 at LogStash::Outputs::ElasticSearch.receive(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/outputs/elasticsearch.rb:153) @40000000528a66c911dacef4 at LogStash::Outputs::Base.handle(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/outputs/base.rb:85) @40000000528a66c911dad6c4 at RUBY.worker_setup(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/outputs/base.rb:77) {code} I can comment out the redis input that is supplying the logs that go through the multiline filter, and then logstash is stable. Here are the relevant entries in my config file: logstash: 1.2.2 java: 1.7.0_05-b05 ruby: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] OS: CentOS 6.2 {code} redis { host => "my.redis.host.net" data_type => "list" type => "php_errors" key => "logstash-php-errors" threads => 4 } filer { ## start php error stuffs if [type] == "php_errors" { multiline { pattern => "^%{PHPTIME} " patterns_dir => [ "/usr/local/etc/cfg/logstash-indexer/patterns" ] negate => true what => previous } mutate { replace => [ "@source_host", "%{host}" ] add_tag => "php_errors" remove_tag => "multiline" } } } output { elasticsearch { cluster => "logs" node_name => "log1-logstash-es" workers => 10 } } {code}

    JIRA | 4 years ago | Ryan Bellows
    org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `tv_sec' for ["2013-11-18T18:48:51.503Z", "2013-11-18T18:48:51.504Z"]:Array @40000000528a66c911da88a4 at LogStash::Event.sprintf(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/event.rb:226)

    Root Cause Analysis

    1. org.jruby.exceptions.RaiseException

      (NoMethodError) undefined method `tv_sec' for ["2013-11-18T18:48:51.503Z", "2013-11-18T18:48:51.504Z"]:Array @40000000528a66c911da88a4 at LogStash::Event.sprintf(file:/usr/local/bin/logstash-1.2.2-flatjar.jar!/logstash/event.rb:226)

      at org.jruby.RubyString.gsub()
    2. JRuby Main Maven Artifact
      RubyString.gsub
      1. org.jruby.RubyString.gsub(org/jruby/RubyString.java:3065)
      1 frame