Skip to content

Plugin crash during graceful shutdown #95

@fadlinurhasan

Description

@fadlinurhasan

Hi Team,

We face below errors when try to restart the td-agent. It seems related to the latest changes when @journal set to nil. This issue appear intermittently. Do you have solution for this case?

OS Version: Ubuntu 20.04
td-agent version: 4.3.0-1
fluent-plugin-systemd version: 1.0.5

Thanks

2021-12-10 17:03:35 +0700 [info]: Received graceful stop
2021-12-10 17:03:35 +0700 [info]: Received graceful stop
2021-12-10 17:03:35 +0700 [info]: #0 fluentd worker is now stopping worker=0
2021-12-10 17:03:35 +0700 [info]: #0 shutting down fluentd worker worker=0
2021-12-10 17:03:35 +0700 [info]: #0 shutting down input plugin type=:systemd plugin_id="object:c01c"
2021-12-10 17:03:35 +0700 [error]: #0 Unexpected error raised. Stopping the timer. title=:in_systemd_emit_worker error_class=NoMethodError error="undefined method `cursor' for nil:NilClass"
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-systemd-1.0.5/lib/fluent/plugin/in_systemd.rb:151:in `yield_current_entry'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-systemd-1.0.5/lib/fluent/plugin/in_systemd.rb:144:in `watch'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-systemd-1.0.5/lib/fluent/plugin/in_systemd.rb:121:in `run'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.14.3/lib/fluent/plugin_helper/timer.rb:80:in `on_timer'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/loop.rb:88:in `run_once'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/loop.rb:88:in `run'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.14.3/lib/fluent/plugin_helper/event_loop.rb:93:in `block in start'
  2021-12-10 17:03:35 +0700 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.14.3/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
2021-12-10 17:03:35 +0700 [error]: #0 Timer detached. title=:in_systemd_emit_worker
2021-12-10 17:03:35 +0700 [info]: #0 shutting down input plugin type=:systemd plugin_id="object:c008"
2021-12-10 17:03:35 +0700 [info]: #0 shutting down input plugin type=:tail plugin_id="object:bfe0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions