Exception in thread ">output" java.lang.NullPointerException when stdin is closed
Description
Gliffy Diagrams
Activity
Show:
Bernd Eckenfels May 8, 2014 at 1:08 AMEdited
Still an issue with 1.4.1 (also with input redirection from file like below).
C:\ws\logtest>logstash-1.4.1\bin\logstash agent -f test.cfg < test1.log
Exception in thread ">output" java.lang.NullPointerException
at org.jruby.RubyIO.fwrite(RubyIO.java:1468)
at org.jruby.RubyIO.write(RubyIO.java:1408)
at org.jruby.RubyIO$INVOKER$i$1$0$write.call(RubyIO$INVOKER$i$1$0$write.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
Details
Details
Assignee
Philippe Weber
Philippe WeberReporter
Bernd Eckenfels
Bernd EckenfelsLabels
Affects versions
Created May 6, 2014 at 10:56 PM
Updated March 10, 2015 at 1:36 PM
When running a simple configuration on Windows7 x64 command line I get a good result when typing interactively and a NPE crash when using a pipe or input redirection to stdin:
C:\logtest> logstash-1.4.0\bin\logstash.bat agent --verbose -V logstash 1.4.0 jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) 64-Bit Server VM 1.7.0_51-b13 [Windows 7-amd64] java 1.7.0_51 (Oracle Corporation) jvm Java HotSpot(TM) 64-Bit Server VM / 24.51-b03 Elasticsearch: Version: 1.0.1, Build: 5c03844/2014-02-25T15:52:53Z, JVM: 1.7.0_51 C:\logtest>echo line1 | logstash-1.4.0\bin\logstash.bat agent -f inout.cfg Exception in thread ">output" java.lang.NullPointerException at org.jruby.RubyIO.fwrite(RubyIO.java:1468) at org.jruby.RubyIO.write(RubyIO.java:1408)
Full transcript here: https://gist.github.com/ecki/301a6a569bb568fa54da