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

Stopping Fluentd service on Windows doesn't work well #1084

Closed
tagomoris opened this issue Jul 5, 2016 · 2 comments · Fixed by #1171
Closed

Stopping Fluentd service on Windows doesn't work well #1084

tagomoris opened this issue Jul 5, 2016 · 2 comments · Fixed by #1171
Labels
bug Something isn't working v0.14 windows

Comments

@tagomoris
Copy link
Member

On Windows environment, Fluentd doesn't stop when Administrator operates "stop" for Fluentd Windows Services in Control Panel, which is registered via fluentd --regwinsvc.

When I launched Fluentd process via command prompt, it stops successfully by Ctrl-c.

  • Fluentd v0.14.1 (via gem install)
  • Windows Server 2012

Configuration file:

<source>
  @type forward
  @label @dump
</source>

<label @dump>
  <match **>
    @type file
    path C:/mydump.*.log
    time_slice_format %Y%m%d%H%M%S
    time_slice_wait 1s
  </match>
</label>

There were no logs when the service was stopped via Services panel, and two "Ruby interpreter" processes were still running.

2016-07-05 07:23:58 +0000 [info]: reading config file path="C:\\fluent_test.conf"
2016-07-05 07:23:58 +0000 [info]: starting fluentd-0.14.1
2016-07-05 07:23:58 +0000 [info]: spawn command to main: C:/Ruby22/bin/ruby.exe
-Eascii-8bit:ascii-8bit  "C:/Ruby22/bin/fluentd" "-c" "C:\fluent_test.conf" "-o" "C:\fluentd.log" "-x" "fluentdwinsvc" --under-supervisor
2016-07-05 07:23:59 +0000 [info]: reading config file path="C:\\fluent_test.conf"
2016-07-05 07:23:59 +0000 [info]: starting fluentd-0.14.1 without supervision
2016-07-05 07:23:59 +0000 [info]: gem 'fluent-plugin-td' version '0.10.28'
2016-07-05 07:23:59 +0000 [info]: gem 'fluentd' version '0.14.1'
2016-07-05 07:23:59 +0000 [info]: gem 'fluentd' version '0.14.0.pre.1'
2016-07-05 07:23:59 +0000 [info]: adding match in @dump pattern="**" type="file"
2016-07-05 07:23:59 +0000 [info]: adding source type="forward"
2016-07-05 07:23:59 +0000 [info]: using configuration file: <ROOT>
  <source>
    @type forward
    @label @dump
  </source>
  <label @dump>
    <match **>
      @type file
      path "C:/mydump.*.log"
      time_slice_format "%Y%m%d%H%M%S"
      time_slice_wait 1s
      buffer_path C:/mydump.*.log
      <buffer time>
        flush_mode lazy
        retry_type exponential_backoff
        path C:/mydump.*.log
        timekey_wait 1s
        timekey 1
      </buffer>
    </match>
  </label>
</ROOT>
2016-07-05 07:23:59 +0000 [info]: listening fluent socket on 0.0.0.0:24224

C:\>
@tagomoris
Copy link
Member Author

It seems that supervisor process uses 25% of CPU, because another process was spawned automatically when I killed a task of 0% CPU usage.

2016-07-05 16 30 15

Log about respawning process:

2016-07-05 07:23:59 +0000 [info]: listening fluent socket on 0.0.0.0:24224
2016-07-05 07:29:10 +0000 [info]: Worker 0 finished unexpectedly with status 1
2016-07-05 07:29:11 +0000 [info]: reading config file path="C:\\fluent_test.conf"
2016-07-05 07:29:11 +0000 [info]: starting fluentd-0.14.1 without supervision
2016-07-05 07:29:11 +0000 [info]: gem 'fluent-plugin-td' version '0.10.28'
2016-07-05 07:29:11 +0000 [info]: gem 'fluentd' version '0.14.1'
2016-07-05 07:29:11 +0000 [info]: gem 'fluentd' version '0.14.0.pre.1'
2016-07-05 07:29:11 +0000 [info]: adding match in @dump pattern="**" type="file"
2016-07-05 07:29:11 +0000 [info]: adding source type="forward"
...

@tagomoris
Copy link
Member Author

I found:

  • ServerEngine kills workers by KILL signal - it makes shutdown sequence not called (huge problem)
  • Even when fluentd is launched on console (non Windows service process), supervisor seems not to kill worker properly

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

Successfully merging a pull request may close this issue.

1 participant