Skip to content

Commit

Permalink
Added clearer message when a filter crash
Browse files Browse the repository at this point in the history
When the filter workers crash Logstash will stop consuming any events,
Since we don't have a dead letter queue yet, we can't restart the
workers.

Fixes elastic#3983

Fixes elastic#3990
  • Loading branch information
ph authored and jordansissel committed Oct 13, 2015
1 parent 93958be commit 4e300a8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/logstash/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,19 @@ def filterworker
break
end
end
rescue => e
@logger.error("Exception in filterworker", "exception" => e, "backtrace" => e.backtrace)
rescue Exception => e
# Plugins authors should manage their own exceptions in the plugin code.
# But if an exception is raised up to the worker thread their are mostly
# fatal and logstash can't recover from this situation.
#
# Users need to check their configuration or see if there is a bug in the
# plugin.
@logger.error("Exception in filterworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.",
"exception" => e, "backtrace" => e.backtrace)
raise
ensure
@filters.each(&:do_close)
end

@filters.each(&:do_close)
end # def filterworker

def outputworker
Expand Down

0 comments on commit 4e300a8

Please sign in to comment.