-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline stops processing events because of exception in filterworker "#<NoMethodError: undefined method `encode' for nil:NilClass>" #2152
Comments
👍 the worker should drop the event and log the message when it gets this sort of exception. Simply refusing to process any more events seems like a poor design, |
Any clues as to a workaround for this, or how to debug it further? It's causing us problems in production. |
@antgel your ruby code is incorrect. It is calling the event['message'][0].encode(...) This |
No. Dropping data because of a resolvable problem is not a good default behavior. :) In the future, we are adding a way to stash these kinds of problematic events in a way that will be recoverable later and will not block further processing of events. You can read more about the dead letter queue feature, here |
closing this as the problem itself related to an error in the configuration. since then the ruby filter has wrapped the code execution in a begin rescue that prints an error message and tags the event with a _rubyexception tag. more about this in https://github.com/logstash-plugins/logstash-filter-ruby/blob/master/lib/logstash/filters/ruby.rb#L37-L43 |
I'm getting the following error in the logstash log, and when it happens the pipeline stops processing events:
The error does not seems to be related to some specific input. Sometimes the log is generated but the pipeline processing continues.
Some info about the environment:
Command line:
My config:
The text was updated successfully, but these errors were encountered: