org.jruby.exceptions.RaiseException: (TypeError) nil is not a string

JIRA | Marc Fournier | 3 years ago
  1. 0

    I know using tags is deprecated in outputs now, but I noticed using them caused logstash to crash. This seems serious enough to file a bugreport. I narrowed down the problem to the following configuration (the crash happens on the first event received): {code} input { stdin { tags => [ "foo", "bar" ] } } output { riemann { tags => [ "bar", "baz" ] } } {code} I also reproduced this problem at least with the statsd and irc plugins, always with the same reference to logstash.jar!/logstash/outputs/base.rb:69, so I guess the problem is on most/all output plugins. The full stacktrace: {code} Pipeline started {:level=>:info, :file=>"/opt/logstash/logstash.jar!/logstash/pipeline.rb", :line=>"69", :method=>"run"} sdgsdg output received {:event=>#<LogStash::Event:0x3ae092f4 @cancelled=false, @data={"message"=>"sdgsdg", "@timestamp"=>"2013-09-09T12:26:21.779Z", "@version"=>"1", "tags"=>["foo", "bar"], "host"=>"lonquimay"}>, :level=>:info, :file=>"(eval)", :line=>"16", :method=>"initialize"} Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (TypeError) nil is not a string at org.jruby.RubyBasicObject.__send__(org/jruby/RubyBasicObject.java:1701) at org.jruby.RubyKernel.send(org/jruby/RubyKernel.java:2209) at RUBY.output?(file:/opt/logstash/logstash.jar!/logstash/outputs/base.rb:69) at RUBY.receive(file:/opt/logstash/logstash.jar!/logstash/outputs/riemann.rb:76) at RUBY.initialize((eval):17) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:255) at RUBY.output(file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:247) at RUBY.outputworker(file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:212) at RUBY.start_outputs(file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:140) {code}

    JIRA | 3 years ago | Marc Fournier
    org.jruby.exceptions.RaiseException: (TypeError) nil is not a string
  2. 0

    Hello, I'm trying the new 1.2.1 Logstash version. But I have an error when upgrading from 1.1.13 to 1.2.1 using stdin + elasticsearch plugin. If I keep the old tags parameter, it failed to output to elasticsearch plugin input { stdin { tags => ["xxx"] type => "test" } } output { stdout { codec => rubydebug } elasticsearch { host => "logstash.elasticsearch.xxx.com" cluster => "logstash-es-cluster" tags => "xxx"} } I got this Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (TypeError) nil is not a string at org.jruby.RubyBasicObject.__send__(org/jruby/RubyBasicObject.java:1701) at org.jruby.RubyKernel.send(org/jruby/RubyKernel.java:2209) at RUBY.output?(file:/opt/logstash/server/lib/logstash-1.2.1-flatjar.jar!/logstash/outputs/base.rb:69) at RUBY.receive(file:/opt/logstash/server/lib/logstash-1.2.1-flatjar.jar!/logstash/outputs/elasticsearch.rb:152) at RUBY.initialize((eval):28) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:255) at RUBY.output(file:/opt/logstash/server/lib/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:247) at RUBY.outputworker(file:/opt/logstash/server/lib/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:212) at RUBY.start_outputs(file:/opt/logstash/server/lib/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:140) If I remove (tags => "xxx") from the output definition it works fine. I'll change my configuration to use the new if syntax but I guess it can a problem for some people upgrading to 1.2.1 without changing the configuration.

    JIRA | 3 years ago | jujugrrr
    org.jruby.exceptions.RaiseException: (TypeError) nil is not a string
  3. 0

    Listen block attempts to create org.projectodd.wunderboss.messaging.Reply

    GitHub | 2 years ago | gxbe
    java.lang.RuntimeException: Unexpected error handling message
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In my setup I use logstash to handle syslog input. One of my network appliances (mail-relay) sends logmessages with "strange" or may be wrong encoding, which leads to crashing logstash. I think, the above message is not validly encoded. In my opinion, if logstash is used in mission-critical environments, it should be tollerant to such "wrongly encoded" events. I checked with the file output and the redis output. Error Message (Redis): {noformat} Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (GeneratorError) source sequence is illegal/malformed utf-8 at json.ext.GeneratorMethods$RbHash.to_json(json/ext/GeneratorMethods.java:71) at LogStash::Event.to_json(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/event.rb:169) at LogStash::Outputs::Redis.receive(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/outputs/redis.rb:150) at RUBY.initialize((eval):17) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:255) at LogStash::Pipeline.output(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:247) at RUBY.outputworker(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:212) at RUBY.start_outputs(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:140) {noformat} Error Message (File): {noformat} Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (GeneratorError) source sequence is illegal/malformed utf-8 at json.ext.GeneratorMethods$RbHash.to_json(json/ext/GeneratorMethods.java:71) at LogStash::Event.to_json(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/event.rb:169) at LogStash::Outputs::File.receive(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/outputs/file.rb:68) at RUBY.initialize((eval):28) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:255) at LogStash::Pipeline.output(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:247) at RUBY.outputworker(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:212) at RUBY.start_outputs(file:/opt/logstash/logstash-1.2.1-flatjar.jar!/logstash/pipeline.rb:140) {noformat} I recorded the corrupted messages with tcpdump and was able to reproduce the exception. Steps to reproduce: 1. Start logstash with following config-file: {noformat} input { udp { port => 514 type => syslog } } output { file { path => "/tmp/out.log" flush_interval => 0 } } {noformat} 2. Send correct message to syslog {noformat} echo -en "syslog correct" | nc -u localhost 514 {noformat} (Check /tmp/out.log for the message 3. Send corrupted message to syslog {noformat} echo -en "syslog corrupted: \xfc" | nc -u localhost 514 {noformat} (Nothing is written to /tmp/out.log, logstash crashes with above error-message) I double-checked with an alternative logstash configuration with charset "ASCII-8BIT". In this case the logline wasn't written to /tmp/out.log but logstash at least kept working normaly. Alternative logstash config: {noformat} input { udp { port => 515 type => syslog codec => plain { charset => "ASCII-8BIT" } } } output { file { path => "/tmp/fortimail-log/out.log" flush_interval => 0 } } {noformat}

    JIRA | 3 years ago | Lucas Bremgartner
    org.jruby.exceptions.RaiseException: (GeneratorError) source sequence is illegal/malformed utf-8
  6. 0

    "(TypeError) requested class .. was not reifiable" in 9.1.6, worked in 9.1.5

    GitHub | 1 month ago | pilhuhn
    org.jruby.exceptions.RaiseException: (TypeError) requested class ChartViewController was not reifiable at org.jruby.java.addons.ClassJavaAddons.become_java!(org/jruby/java/addons/ClassJavaAddons.java:40)

    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

      (TypeError) nil is not a string

      at org.jruby.RubyBasicObject.__send__()
    2. JRuby Main Maven Artifact
      RubyKernel.send
      1. org.jruby.RubyBasicObject.__send__(org/jruby/RubyBasicObject.java:1701)
      2. org.jruby.RubyKernel.send(org/jruby/RubyKernel.java:2209)
      2 frames