-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fluentd gives unexcepted error when sending SIGHUP signal #1674
Comments
We recently changed the signal handling of docker image: fluent/fluentd-docker-image#93 Could you check this is the cause or not? |
Updated with additional information Note: Docker 1.13+ has native support for Tini (https://github.com/krallin/tini) which provides basically identical functionality than dumb-init. It can be enabled by passing --init parameter to docker run command. I did some quick debugging to find the root cause of the issue (I work in the same team as mikkohoo).
Note that I'm not familiar with Fluentd codebase and I also rarely do any Ruby programming so take the above with grain of salt. :) |
I see. Thanks for further investigation. |
I think the entrypoint script will break down if the parameter is added to the shebang line because parameter handling is a bit weird in shebang lines. It would probably be cleaner to add This change would fix the dumb-init issue but not the config[:worker_pid] cleanup issue in supervisor implementation. It is easy to reproduce by sending SIGHUP twice to Fluentd . You should always get the "Unexpected error No such process" error after sending the second SIGHUP. Older Fluentd versions (like 0.14.15) probably work because the config[:worker_pid] was a single value, not an array. When supervisor received the SIGHUP it killed the old worker and overwrote config[:worker_pid] with the new worker PID. In this commit ed5f0cb the config[:worker_pid] was changed to array but nothing seems to remove the worker PID from array when worker is killed. |
supervisor: Clear previous worker pids when receives kill signals. ref #1674
Build new fluentd images with above 2 patches. |
Working as expect, good job! |
Following scenario was tested with official 0.14.19 and 0.14.20 fluentd docker images.
Description:
We have used SIGHUP signal to reload configuration each time our configuration changes. This has been working perfectly in our use case until 0.14.20. Apparently something has been changed in 0.14.20 since now we get following error each time we send SIGHUP signal to fluentd process.
How to reproduce:
Complete log
The text was updated successfully, but these errors were encountered: