fluentd: [in_tail] when watched files are deleted, logged Error: undefined method `pe=' for # On Windows, in_tail plugin causes error when watched files are deleted.
Error message is like below.
undefined method `pe=' for #<Fluent::TailInput::TailWatcher::NullIOHandler:::0x0000000XXXXXXXX>"`
(I have not tested on Linux, so I can’t say it is OK on Linux…)
Steps to Reproduce
- start fluentd with using in_tail
- make a watched file
- write “hoge” to the file and save
- delete file on Windows Explorer
fluentd or td-agent version.
both of them
- fluentd.0.14.0.pre.1 revision: @c874f9521b0679c8cd4f1853002dcab6b422c454 (clone on Apr 27)
- fluentd.0.14.0.pre.1 revision: @aa9b87d931be2b014a86c5aa87ecf0bdddef7351 (clone on Mar 7)
- it doesn’t reproduce with 0.14.0.pre.1 from rubygems.org
Environment information, e.g. OS.
- OS: Windows 2012
- Ruby: 2.2.4 x64 (Rubyinstaller)
Configuration and Logs
It is at revision @c874f9521b0679c8cd4f1853002dcab6b422c454 log.
2016-04-27 14:23:27 +0900 [info]: reading config file path=".\\fluent.conf"
2016-04-27 14:23:27 +0900 [info]: starting fluentd-0.14.0.pre.1
2016-04-27 14:23:27 +0900 [info]: spawn command to main (windows) : C:/app/Ruby22-x64/bin/ruby.exe 'C:/app/Ruby22-x64/bin/fluentd' -c .\fluent.conf -o fluentd.log --no-supervisor
2016-04-27 14:23:28 +0900 [info]: reading config file path=".\\fluent.conf"
2016-04-27 14:23:28 +0900 [info]: starting fluentd-0.14.0.pre.1 without supervision
2016-04-27 14:23:28 +0900 [debug]: install_main_process_winsigint_handler***** installed main winsiginthandler
2016-04-27 14:23:28 +0900 [info]: gem 'fluentd' version '0.14.0.pre.1'
2016-04-27 14:23:28 +0900 [info]: adding match pattern="**" type="stdout"
2016-04-27 14:23:28 +0900 [info]: adding source type="tail"
2016-04-27 14:23:28 +0900 [info]: using configuration file: <ROOT>
<system>
log_level debug
</system>
<source>
@type tail
@id tail
path "C:\\app\\fluentd\\test.log"
tag "test.log"
format none
pos_file "test.pos"
read_from_head true
</source>
<match **>
@type stdout
</match>
</ROOT>
2016-04-27 14:23:35 +0900 [info]: following tail of C:\app\fluentd\test.log
2016-04-27 14:23:35 +0900 fluent.info: {"message":"following tail of C:\\app\\fluentd\\test.log"}
2016-04-27 14:23:40 +0900 test.log: {"message":"hoge"}
2016-04-27 14:23:44 +0900 [info]: detected rotation of C:\app\fluentd\test.log; waiting 5 seconds
2016-04-27 14:23:44 +0900 fluent.info: {"message":"detected rotation of C:\\app\\fluentd\\test.log; waiting 5 seconds"}
2016-04-27 14:23:50 +0900 [info]: detected rotation of C:\app\fluentd\test.log
2016-04-27 14:23:50 +0900 [error]: undefined method `pe=' for #<Fluent::TailInput::TailWatcher::NullIOHandler:0x000000027030d0>
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:481:in `swap_state'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:471:in `on_rotate'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:639:in `call'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:639:in `on_notify'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:406:in `on_notify'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:494:in `call'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:494:in `on_timer'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/cool.io-1.4.3/lib/cool.io/loop.rb:88:in `run_once'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/cool.io-1.4.3/lib/cool.io/loop.rb:88:in `run'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:264:in `run'
2016-04-27 14:23:50 +0900 fluent.info: {"message":"detected rotation of C:\\app\\fluentd\\test.log"}
2016-04-27 14:23:50 +0900 fluent.error: {"message":"undefined method `pe=' for #<Fluent::TailInput::TailWatcher::NullIOHandler:0x000000027030d0>"}
On Windows, in_tail plugin causes error when watched files are deleted. Error message is like below.
undefined method `pe=' for #<Fluent::TailInput::TailWatcher::NullIOHandler:::0x0000000XXXXXXXX>"`
(I have not tested on Linux, so I can’t say it is OK on Linux…)
Steps to Reproduce
- start fluentd with using in_tail
- make a watched file
- write “hoge” to the file and save
- delete file on Windows Explorer
fluentd or td-agent version.
both of them
- fluentd.0.14.0.pre.1 revision: @c874f9521b0679c8cd4f1853002dcab6b422c454 (clone on Apr 27)
- fluentd.0.14.0.pre.1 revision: @aa9b87d931be2b014a86c5aa87ecf0bdddef7351 (clone on Mar 7)
- it doesn’t reproduce with 0.14.0.pre.1 from rubygems.org
Environment information, e.g. OS.
- OS: Windows 2012
- Ruby: 2.2.4 x64 (Rubyinstaller)
Configuration and Logs
It is at revision @c874f9521b0679c8cd4f1853002dcab6b422c454 log.
2016-04-27 14:23:27 +0900 [info]: reading config file path=".\\fluent.conf"
2016-04-27 14:23:27 +0900 [info]: starting fluentd-0.14.0.pre.1
2016-04-27 14:23:27 +0900 [info]: spawn command to main (windows) : C:/app/Ruby22-x64/bin/ruby.exe 'C:/app/Ruby22-x64/bin/fluentd' -c .\fluent.conf -o fluentd.log --no-supervisor
2016-04-27 14:23:28 +0900 [info]: reading config file path=".\\fluent.conf"
2016-04-27 14:23:28 +0900 [info]: starting fluentd-0.14.0.pre.1 without supervision
2016-04-27 14:23:28 +0900 [debug]: install_main_process_winsigint_handler***** installed main winsiginthandler
2016-04-27 14:23:28 +0900 [info]: gem 'fluentd' version '0.14.0.pre.1'
2016-04-27 14:23:28 +0900 [info]: adding match pattern="**" type="stdout"
2016-04-27 14:23:28 +0900 [info]: adding source type="tail"
2016-04-27 14:23:28 +0900 [info]: using configuration file: <ROOT>
<system>
log_level debug
</system>
<source>
@type tail
@id tail
path "C:\\app\\fluentd\\test.log"
tag "test.log"
format none
pos_file "test.pos"
read_from_head true
</source>
<match **>
@type stdout
</match>
</ROOT>
2016-04-27 14:23:35 +0900 [info]: following tail of C:\app\fluentd\test.log
2016-04-27 14:23:35 +0900 fluent.info: {"message":"following tail of C:\\app\\fluentd\\test.log"}
2016-04-27 14:23:40 +0900 test.log: {"message":"hoge"}
2016-04-27 14:23:44 +0900 [info]: detected rotation of C:\app\fluentd\test.log; waiting 5 seconds
2016-04-27 14:23:44 +0900 fluent.info: {"message":"detected rotation of C:\\app\\fluentd\\test.log; waiting 5 seconds"}
2016-04-27 14:23:50 +0900 [info]: detected rotation of C:\app\fluentd\test.log
2016-04-27 14:23:50 +0900 [error]: undefined method `pe=' for #<Fluent::TailInput::TailWatcher::NullIOHandler:0x000000027030d0>
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:481:in `swap_state'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:471:in `on_rotate'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:639:in `call'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:639:in `on_notify'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:406:in `on_notify'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:494:in `call'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:494:in `on_timer'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/cool.io-1.4.3/lib/cool.io/loop.rb:88:in `run_once'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/cool.io-1.4.3/lib/cool.io/loop.rb:88:in `run'
2016-04-27 14:23:50 +0900 [error]: C:/app/Ruby22-x64/lib/ruby/gems/2.2.0/gems/fluentd-0.14.0.pre.1/lib/fluent/plugin/in_tail.rb:264:in `run'
2016-04-27 14:23:50 +0900 fluent.info: {"message":"detected rotation of C:\\app\\fluentd\\test.log"}
2016-04-27 14:23:50 +0900 fluent.error: {"message":"undefined method `pe=' for #<Fluent::TailInput::TailWatcher::NullIOHandler:0x000000027030d0>"}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (11 by maintainers)
Commits related to this issue
- Update windows-pr lowest dependency to 1.2.5. fix #920 — committed to fluent/fluentd by repeatedly 8 years ago
- Merge pull request #1065 from fluent/update-windows-pr-dependency Update windows-pr lowest dependency to 1.2.5. fix #920 — committed to fluent/fluentd by repeatedly 8 years ago
I updated window-pr and confirmed this issue didn’t happen with both ruby2.2.4 x86/x64 for the scenario which is 2 times loop of make file -> delete file. Thanks for your great job! 👍🐱👍