Closed ghost closed 6 years ago
Same issue - installed via repo on centos:
NoMethodError: undefined method `map_cleanup' for nil:NilClass
start at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-multiline-2.0.11/lib/logstash/codecs/identity_map_codec.rb:55
Same here. For some reason the @listener
in https://github.com/logstash-plugins/logstash-codec-multiline/blob/master/lib/logstash/codecs/identity_map_codec.rb#L55 is nil. This should just happen within the stop method. But in this case @running
should be false and the code @listener.send(@method_symbol)
shouldn't be reached. As a workaround we patched the file with an nil check before performing @listener.send(@method_symbol)
.
@coder-hugo you are right, this shouldn't happen, but you are using this codec with what input?
@ph we are using the file input which uses the IdentityMapCodec
in line 230.
This would appear to be a race condition during shutdown. I think the nil check is a reasonable solution.
Will implement.
Hi @coder-hugo what is the exact solution applied?
@elwesingollo We patched the file as follows:
--- /tmp/identity_map_codec.rb 2016-04-27 14:59:44.560814581 +0200
+++ /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-multiline-2.0.11/lib/logstash/codecs/identity_map_codec.rb 2016-04-27 15:02:00.249239046 +0200
@@ -52,7 +52,7 @@
while running? do
sleep @interval
break if !running?
- @listener.send(@method_symbol)
+ @listener.send(@method_symbol) unless @listener.nil?
end
end
self
I ran into this issue on ES 2.3.4. Which release is this expected to be fixed? At the time this happened there is no log entry that logstash was processing so puzzled at what is the root cause
I can confirm this issue is still present in the latest ES v2.4.1.
NoMethodError: undefined method `map_cleanup' for nil:NilClass start at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-multiline-2.0.11/lib/logstash/codecs/identity_map_codec.rb:55
"current_call"=>"[...]/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/output_delegator.rb:128:in `pop'"}]}>, :level=>:warn}
@coder-hugo Have you tried submitting that fix as a pull request?
We're seeing this exact issue, too. Wondering if that fix worked for anyone else.
@idubinskiy - Are you seeing this issue at shutdown only or while general running of Logstash?
Confirmed this issue exits in logstash 2.4.0.
That patch seems work so far, but not totally sure, since it only occurs on some of our nodes, not all of them.
Let us know when this is fixed, so that we can upgrade our Logstash.
@gengwg - Are you seeing this issue at shutdown only or while general running of Logstash?
@guyboertje It's seen after issuing restart of logstash, so I guess it's shutdown.
@gengwg - Got it, thanks.
Any progress on this?
hello, I've got below error message, logstash ver. 5.4.0
[2017-06-28T04:06:35,862][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<NoMethodError: undefined method
map_cleanup' for nil:NilClass>, :backtrace=>["/snap/local/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-multiline-3.0.3/lib/logstash/codecs/identity_map_codec.rb:55:in
start'"]}
Searches are telling me this has been a problem since at least March 2016. I can confirm it just happened to me this morning with Logstash 5.x. Is there anything we in the community can do to help move this along?
@coder-hugo can you describe the step to run the patch? Thanks
@djromy2006 you just have to apply the patch of my comment to the identity_map_codec.rb
file of your logstash installation.
`
I got it thank you! I will apply it and see how it works for me. Thanks!
NoMethodError: undefined method `map_cleanup' for nil:NilClass start at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-multiline-2.0.9/lib/logstash/codecs/identity_map_codec.rb:55
I diffed my current version with the following library hosted on github, seems up to date.