We're updating the issue view to help you get more done. 

NameError thrown when starting logstash with embedded elasticsearch output


I am currently struggling with the migration from logstash 1.3.3 to logstash 1.4.0. There seems to be an issue with the bundled gems which manifests when using an elasticsearch output using embbedded => true. My logstash starts just fine if I remove that output from the config.

The logstash process dies after throwing a Name Error:

1 2 3 4 NameError: uninitialized constant HTTP const_missing at org/jruby/RubyModule.java:2690 (root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/http_parser.rb-0.5.3-java/lib/http_parser.rb:4 require at org/jruby/RubyKernel.java:1085

I had a look at the file mentioned and found this:


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $:.unshift File.expand_path('../', __FILE__) require 'ruby_http_parser' Http = HTTP module HTTP class Parser class << self attr_reader :default_header_value_type def default_header_value_type=(val) if (val != :mixed && val != :strings && val != :arrays) raise ArgumentError, "Invalid header value type" end @default_header_value_type = val end end end end HTTP::Parser.default_header_value_type = :mixed

I am no Ruby coder but the line the exception complains about looks fishy. If I uncomment it:

1 #Http = HTTP

The error goes away, but I have no idea what horrors I conjure by doing that.





Logstash Developers


Christian Meyer

Affects versions