fluent / fluent-plugin-kafka

Kafka input and output plugin for Fluentd
Other
303 stars 176 forks source link

when fluentd's config graceful reload, Warn logs have occurred 'undefined method `synchronize' for nil:NilClass' #509

Open tatum-kang opened 2 months ago

tatum-kang commented 2 months ago

Describe the bug

fluentd config gracefule reload. Warn logs have occurred.

2024-06-24 14:25:56 +0900 [warn]: unexpected error while shutting down on output plugin plugin=Fluent::Kafka2Output plugin_id="object:175c" error_class=NoMethodError error="undefined method synchronize' for nil:NilClass" 553 2024-06-24 14:25:56 +0900 [warn]: /usr/local/lib/ruby/gems/3.2.0/gems/fluent-plugin-kafka-0.19.2/lib/fluent/plugin/out_kafka2.rb:279:inshutdown_producers' 552 2024-06-24 14:25:56 +0900 [warn]: /usr/local/lib/ruby/gems/3.2.0/gems/fluent-plugin-kafka-0.19.2/lib/fluent/plugin/out_kafka2.rb:271:in shutdown' 551 2024-06-24 14:25:56 +0900 [warn]: /usr/local/lib/ruby/gems/3.2.0/gems/fluentd-1.16.5/lib/fluent/root_agent.rb:280:inblock (3 levels) in shutdown'

To Reproduce

localhost:24444/api/config.gracefulReload

Expected behavior

config graceful reload

Your Environment

- Fluentd version: 1.16.3
- TD Agent version:
- fluent-plugin-kafka version: 0.19.2
- ruby-kafka version:
- Operating system: debian-2.0
- Kernel version:

Your Configuration

<match iceland-access-log.*> @type kafka2 @log_level debug @id test_log client_id test123

  # broker
  brokers kafka adress

  <buffer topic>
    @type file
    path /home/deploy/log/test/fluentd/buffer
    flush_mode interval
    flush_interval 10s
    flush_thread_count 3
    total_limit_size 1G
    chunk_limit_size 1M
    overflow_action drop_oldest_chunk
  </buffer>

  <format>
    @type json
  </format>

  # topic settings
  topic_key  test_topic
  default_topic test_topic
  message_key_key   id
  default_message_key  id
  exclude_fields $.id

  # producer settings
  required_acks 1
  ack_timeout 1
  compression_codec gzip
</match>

Your Error Log

2024-06-24 14:25:56 +0900 [warn]: unexpected error while shutting down on output plugin plugin=Fluent::Kafka2Output plugin_id="object:175c" error_class=NoMethodError error="undefined method `synchronize' for nil:NilClass"
553
  2024-06-24 14:25:56 +0900 [warn]: /usr/local/lib/ruby/gems/3.2.0/gems/fluent-plugin-kafka-0.19.2/lib/fluent/plugin/out_kafka2.rb:279:in `shutdown_producers'
552
  2024-06-24 14:25:56 +0900 [warn]: /usr/local/lib/ruby/gems/3.2.0/gems/fluent-plugin-kafka-0.19.2/lib/fluent/plugin/out_kafka2.rb:271:in `shutdown'
551
  2024-06-24 14:25:56 +0900 [warn]: /usr/local/lib/ruby/gems/3.2.0/gems/fluentd-1.16.5/lib/fluent/root_agent.rb:280:in `block (3 levels) in shutdown'

Additional context

No response