Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sd_srv plugin always reports warnings while exiting #2972

Closed
eagletmt opened this issue Apr 28, 2020 · 1 comment · Fixed by #2974
Closed

sd_srv plugin always reports warnings while exiting #2972

eagletmt opened this issue Apr 28, 2020 · 1 comment · Fixed by #2974
Assignees
Labels
bug Something isn't working

Comments

@eagletmt
Copy link
Contributor

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

@ganmacs ganmacs self-assigned this Apr 28, 2020
@ganmacs ganmacs added the bug Something isn't working label Apr 30, 2020
@ganmacs
Copy link
Member

ganmacs commented Apr 30, 2020

#2974 should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants