We have few nodes in autoscaling in aws environment. When new nodes gets created, td-agent doesn't send logs and give us the following error untill we restart td-agent.
2021-04-26 16:07:48 +0000 [error]: #0 Cannot output messages with tag 'ad-be-cd.hybris.access'
2021-04-26 16:07:58 +0000 [error]: #0 failed to configure sub output s3: Other 's3' plugin already use same buffer path: type = s3, buffer path = /var/log/td-agent/buffer/s3/ad-be-cd.hybris.access
2021-04-26 16:07:58 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/buf_file.rb:74:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin.rb:178:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/output.rb:342:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin_helper/inject.rb:104:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin_helper/formatter.rb:83:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-s3-1.5.1/lib/fluent/plugin/out_s3.rb:179:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin.rb:178:in `configure'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-forest-0.3.3/lib/fluent/plugin/out_forest.rb:132:in `block in plant'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-forest-0.3.3/lib/fluent/plugin/out_forest.rb:128:in `synchronize'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-forest-0.3.3/lib/fluent/plugin/out_forest.rb:128:in `plant'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-forest-0.3.3/lib/fluent/plugin/out_forest.rb:169:in `emit'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/compat/output.rb:201:in `process'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/bare_output.rb:53:in `emit_sync'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/out_copy.rb:61:in `block in process'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/out_copy.rb:59:in `each'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/out_copy.rb:59:in `each_with_index'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/out_copy.rb:59:in `process'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/multi_output.rb:148:in `emit_sync'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/event_router.rb:160:in `emit_events'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/event_router.rb:97:in `emit_stream'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:533:in `receive_lines'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:913:in `block in handle_notify'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:945:in `with_io'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:893:in `handle_notify'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:876:in `block in on_notify'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:876:in `synchronize'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:876:in `on_notify'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:711:in `on_notify'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:361:in `block in setup_watcher'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin/in_tail.rb:652:in `on_timer'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin_helper/event_loop.rb:93:in `block in start'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.1/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
After restart of td-agent, the errors goes away and everything works normal.
I have noticed that the first time when it runs, it doesn't create the 's3' folder in buffer path (/var/log/td-agent/buffer/s3/ad-be-cd.hybris.access) and upon restart it does.
In my config, I have various store directives where I create folders on the fly and I do not face any issue at all. In fact, the same configuration is running on 4 environements and none of them has this issue.
Here is my config for s3 part.