Skip to content

sd_srv plugin always reports warnings while exiting #2972

@eagletmt

Description

@eagletmt

Describe the bug
When I use sd_srv plugin, it always reports warnings saying "thread doesn't exit correctly (killed or other reason)".

To Reproduce
Start fluentd using sd_srv plugin.

% bundle exec fluentd -c forward.conf
2020-04-28 20:00:21 +0900 [info]: parsing config file is succeeded path="forward.conf"
2020-04-28 20:00:21 +0900 [info]: gem 'fluentd' version '1.10.2'
2020-04-28 20:00:21 +0900 [info]: adding forwarding server 'lvh.me' host="127.0.0.1" port=25224 weight=100 plugin_id="object:2ad749de0238"
2020-04-28 20:00:21 +0900 [info]: using configuration file: <ROOT>
  <match test>
    @type forward
    <service_discovery>
      @type "srv"
      service "fluentd"
      proto "tcp"
      hostname "wanko.cc"
    </service_discovery>
  </match>
</ROOT>
2020-04-28 20:00:21 +0900 [info]: starting fluentd-1.10.2 pid=709764 ruby="2.6.5"
2020-04-28 20:00:21 +0900 [info]: spawn command to main:  cmdline=["/home/eagletmt/.clg/github.com/rbenv/rbenv/versions/2.6.5/bin/ruby", "-r/home/eagletmt/.clg/github.com/rbenv/rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/setup", "-Eascii-8bit:ascii-8bit", "/home/eagletmt/gems/ruby/2.6.0/bin/fluentd", "-c", "forward.conf", "--under-supervisor"]
2020-04-28 20:00:22 +0900 [info]: adding match pattern="test" type="forward"
2020-04-28 20:00:22 +0900 [info]: #0 adding forwarding server 'lvh.me' host="127.0.0.1" port=25224 weight=100 plugin_id="object:2b26e23de5bc"
2020-04-28 20:00:22 +0900 [info]: #0 starting fluentd worker pid=709802 ppid=709764 worker=0
2020-04-28 20:00:22 +0900 [info]: #0 fluentd worker is now running worker=0

Then send SIGTERM to the process (kill -TERM 709764).

Expected behavior
The fluentd process exits without any warnings.

Your Environment

  • Fluentd or td-agent version: fluentd --version or td-agent --version
    • fluentd 1.10.2
  • Operating system: cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
  • Kernel version: uname -r
    • 5.6.2-arch1-2

If you hit the problem with older fluentd version, try latest version first.

Your Configuration

<match test>
  @type forward
  <service_discovery>
    @type srv
    service fluentd
    proto tcp
    hostname wanko.cc
  </service_discovery>
</match>

Your Error Log

2020-04-28 20:00:50 +0900 [info]: Received graceful stop
2020-04-28 20:00:51 +0900 [info]: #0 fluentd worker is now stopping worker=0
2020-04-28 20:00:51 +0900 [info]: #0 shutting down fluentd worker worker=0
2020-04-28 20:00:51 +0900 [info]: #0 shutting down output plugin type=:forward plugin_id="object:2b26e23de5bc"
2020-04-28 20:00:51 +0900 [warn]: #0 thread doesn't exit correctly (killed or other reason) plugin=Fluent::Plugin::SrvServiceDiscovery title=:event_loop thread=#<Thread:0x0000564dc4cb40e0@event_loop@/home/eagletmt/gems/ruby/2.6.0/gems/fluentd-1.10.2/lib/fluent/plugin_helper/thread.rb:70 aborting> error=nil
2020-04-28 20:00:51 +0900 [info]: Worker 0 finished with status 0

Additional context

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions