org.jruby.exceptions.RaiseException: (RuntimeError) Can't daemonize, no fork in JRuby. at LogStash::Agent.configure(file:/var/lib/logstash/logstash-1.0.17-monolithic.jar!/logstash/agent.rb:207) at LogStash::Agent.run(file:/var/lib/logstash/logstash-1.0.17-monolithic.jar!/logstash/agent.rb:242)

JIRA | Alexander Fortin | 5 years ago
  1. 0

    While backfilling Logstash with old logs, Logstash crashed with the following stack trace: {noformat} Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `<<' for nil:NilClass at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:369) at Grok::Match.each_capture(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/jls-grok-0.10.10/lib/grok/pure/match.rb:23) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at Grok::Match.each_capture(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/jls-grok-0.10.10/lib/grok/pure/match.rb:21) at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:317) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:301) at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1257) at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:292) at LogStash::FilterWorker.flusher(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:50) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at LogStash::FilterWorker.flusher(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:48) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at LogStash::FilterWorker.flusher(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:45) at RUBY.run(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:29) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:249) at RUBY.interval(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/stud-0.0.8/lib/stud/interval.rb:11) at RUBY.run(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:29) {noformat} From what I can see, event.fields[key] ||= [] (grok.rb:368) isn't behaving as expected and when Logstash tries to push to event.fields[key] on the next line, it's still nil. Perhaps I'm wrong, I don't really know Ruby, I can just about read it, and Googled for information I didn't know. Thanks, Daniel EDIT: Just to add, those line numbers are from the grok.rb contained in the 1.1.9 jar and don't correspond with the current git tree.

    JIRA | 4 years ago | Daniel Brierton
    org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `<<' for nil:NilClass at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:369) at Grok::Match.each_capture(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/jls-grok-0.10.10/lib/grok/pure/match.rb:23)
  2. 0

    While backfilling Logstash with old logs, Logstash crashed with the following stack trace: {noformat} Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `<<' for nil:NilClass at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:369) at Grok::Match.each_capture(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/jls-grok-0.10.10/lib/grok/pure/match.rb:23) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at Grok::Match.each_capture(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/jls-grok-0.10.10/lib/grok/pure/match.rb:21) at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:317) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:301) at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1257) at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:292) at LogStash::FilterWorker.flusher(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:50) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at LogStash::FilterWorker.flusher(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:48) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) at LogStash::FilterWorker.flusher(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:45) at RUBY.run(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:29) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:249) at RUBY.interval(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/stud-0.0.8/lib/stud/interval.rb:11) at RUBY.run(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:29) {noformat} From what I can see, event.fields[key] ||= [] (grok.rb:368) isn't behaving as expected and when Logstash tries to push to event.fields[key] on the next line, it's still nil. Perhaps I'm wrong, I don't really know Ruby, I can just about read it, and Googled for information I didn't know. Thanks, Daniel EDIT: Just to add, those line numbers are from the grok.rb contained in the 1.1.9 jar and don't correspond with the current git tree.

    JIRA | 4 years ago | Daniel Brierton
    org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `<<' for nil:NilClass at LogStash::Filters::Grok.filter(file:/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/filters/grok.rb:369) at Grok::Match.each_capture(jar:file:/opt/logstash/logstash-1.1.9-monolithic.jar!/gems/jls-grok-0.10.10/lib/grok/pure/match.rb:23)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    ]}, \"patterns_dir\"=>[], \"drop_if_match\"=>false, \"break_on_match\"=>true, \"named_captures_only\"=>true, \"keep_empty_captures\"=>false}"},"level":"fatal"} LogStash::ThreadWatchdog::TimeoutError: watchdog timeout watch at file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/logstash/threadwatchdog.rb:29 each at org/jruby/RubyArray.java:1615 watch at file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/logstash/threadwatchdog.rb:20 run_with_config at file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/logstash/agent.rb:446 Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (SystemExit) watchdog timeout at Gem::Specification.contains_requirable_file?(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:982) at (Anonymous).find_by_path(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:443) at (Anonymous).each(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:411) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) at (Anonymous).each(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:410) at org.jruby.RubyEnumerable.find(org/jruby/RubyEnumerable.java:573) at (Anonymous).find_by_path(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:442) at (Anonymous).try_activate(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:206) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55) at (Anonymous).(root)(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/gems/ftw-0.0.19/lib/rack/handler/ftw.rb:1) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1042) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36) at (Anonymous).(root)(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/gems/ftw-0.0.19/lib/rack/handler/ftw.rb:3) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1042) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36) at logstash.runner.run(logstash/runner.rb:73) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:258) at logstash.runner.run(logstash/runner.rb:95) at logstash.runner.main(logstash/runner.rb:37) at logstash.runner.(root)(logstash/runner.rb:120)

    JIRA | 4 years ago | Dominic Talbot
    org.jruby.exceptions.RaiseException: (SystemExit) watchdog timeout at Gem::Specification.contains_requirable_file?(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:982) at (Anonymous).find_by_path(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:443) at (Anonymous).each(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:411)
  5. 0

    ]}, \"patterns_dir\"=>[], \"drop_if_match\"=>false, \"break_on_match\"=>true, \"named_captures_only\"=>true, \"keep_empty_captures\"=>false}"},"level":"fatal"} LogStash::ThreadWatchdog::TimeoutError: watchdog timeout watch at file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/logstash/threadwatchdog.rb:29 each at org/jruby/RubyArray.java:1615 watch at file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/logstash/threadwatchdog.rb:20 run_with_config at file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/logstash/agent.rb:446 Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (SystemExit) watchdog timeout at Gem::Specification.contains_requirable_file?(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:982) at (Anonymous).find_by_path(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:443) at (Anonymous).each(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:411) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) at (Anonymous).each(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:410) at org.jruby.RubyEnumerable.find(org/jruby/RubyEnumerable.java:573) at (Anonymous).find_by_path(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:442) at (Anonymous).try_activate(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:206) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55) at (Anonymous).(root)(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/gems/ftw-0.0.19/lib/rack/handler/ftw.rb:1) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1042) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36) at (Anonymous).(root)(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/gems/ftw-0.0.19/lib/rack/handler/ftw.rb:3) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1042) at Kernel.require(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36) at logstash.runner.run(logstash/runner.rb:73) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:258) at logstash.runner.run(logstash/runner.rb:95) at logstash.runner.main(logstash/runner.rb:37) at logstash.runner.(root)(logstash/runner.rb:120)

    JIRA | 4 years ago | Dominic Talbot
    org.jruby.exceptions.RaiseException: (SystemExit) watchdog timeout at Gem::Specification.contains_requirable_file?(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:982) at (Anonymous).find_by_path(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:443) at (Anonymous).each(file:/home/logger/logstash/logstash-1.1.1-monolithic.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:411)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.jruby.exceptions.RaiseException

      (RuntimeError) Can't daemonize, no fork in JRuby. at LogStash::Agent.configure(file:/var/lib/logstash/logstash-1.0.17-monolithic.jar!/logstash/agent.rb:207) at LogStash::Agent.run(file:/var/lib/logstash/logstash-1.0.17-monolithic.jar!/logstash/agent.rb:242)

      at logstash.runner.run()
    2. logstash
      runner.run
      1. logstash.runner.run(logstash/runner.rb:36)
      1 frame
    3. JRuby Main Maven Artifact
      RubyProc.call
      1. org.jruby.RubyProc.call(org/jruby/RubyProc.java:268)
      2. org.jruby.RubyProc.call(org/jruby/RubyProc.java:228)
      2 frames
    4. logstash
      runner.<init>
      1. logstash.runner.run(logstash/runner.rb:53)
      2. logstash.runner.main(logstash/runner.rb:13)
      3. logstash.runner.<init>(root)
      3 frames