Error: undefined method "emit_events"
RyanMcDonald opened this issue · 4 comments
RyanMcDonald commented
I'm getting the following error with fluent-plugin-reemit 0.3.1 and Fluent 0.14.21:
2017-09-14 12:07:55 -0700 [warn]: #0 emit transaction failed: error_class=NoMethodError error="undefined method `emit_events' for #<Fluent::Plugin::RecordTransformerFilter:007ff27559c9e0>" tag="test"
2017-09-14 12:07:55 -0700 [warn]: #0 /Users/ryan/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/fluent-plugin-reemit-0.3.1/lib/fluent/plugin/out_reemit.rb:120:in `emit_stream'
2017-09-14 12:07:55 -0700 [warn]: #0 /Users/ryan/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/fluent-plugin-reemit-0.3.1/lib/fluent/plugin/out_reemit.rb:33:in `emit'
sonots commented
Could you paste your config? Plugin worked with https://github.com/sonots/fluent-plugin-reemit/blob/96d017e9b0a7e3cca6503a9fbf17cf9a86ff345b/examples/reemit.conf at least.
RyanMcDonald commented
I was able to get the error with this minimal config. It seems to happen if you have any filter directive after the reemit.
<match **>
@type copy
<store>
@type stdout
</store>
<store>
@type reemit
</store>
</match>
<filter **>
@type stdout
</filter>
In this case I used @type stdout
instead of record_transformer, which got this error:
2017-09-14 12:39:25 -0700 [warn]: #0 emit transaction failed: error_class=NoMethodError error="undefined method `emit_events' for #<Fluent::Plugin::StdoutFilter:007fbcfa48b818>" tag="test"
2017-09-14 12:39:25 -0700 [warn]: #0 /Users/ryan/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/fluent-plugin-reemit-0.3.1/lib/fluent/plugin/out_reemit.rb:120:in `emit_stream'
sonots commented
Thanks! When I created this plugin (fluentd 0.10), filter plugin mechanism did not exist, and I was not supposed to use with it. We need to fix to support filter plugins.
sonots commented
0.3.2 is released.