-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Filebeat] Filebeat process does not exit when stopping with CTRL-C #22813
Comments
Pinging @elastic/integrations-services (Team:Services) |
Filebeat also does not stop when it fails to send data into its output, and is in retry stage. Below are example logs form Filebeat when it cannot connect to Elastic cluster due to auth errors. In this state, killing it with Cntrl+C does not produce any result, only 'kill pid' from another terminal works.
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
I'm finding the same thing in Filebeat 8.9, I run from CL with |
@thekofimensah could you elaborate a bit more on how you are reproducing it? |
I finally managed to reproduce it, it happens when the queue is full and the output is blocked.
I'm working on a fix. |
Sorry for the delay in responding, the notification got hidden. In my situations, I parse 20 different log files with a wildcard under the filestream input plugin. Once the ingest finishes and the data has all sent, I will CTRL+C, many times, and filebeat doesn't shut down (even after 1m) I get these messages perpetually, and filebeat doesn't ever shut down:
I can try on the next version to see if your fix did it or not |
Is Filebeat successfully sending data to the output? |
Yes filebeat is sending to elasticsearch without problem. Yes, if I send the signal directly, it stops filebeat, but having to manually do that each time is a bit annoying for rapid problem solving |
If sending the signal directly works, this means Filebeat is able to correct receive and react to the signal. It looks like your terminal might not be correctly sending the signal when CTRL+C is pressed. A few ways to debug it:
If |
Whenever an input is making use of a registry, filebeat fails to stop when CTRl-C is hit, and instead it keeps sending monitoring data, forcing you to either suspend and kill or kill the process from another session.
After some digging it seems to hang on https://github.com/elastic/beats/pull/19633/files#diff-97b65fad069be1072219d7ae6a1e8f64d287e8cb6c1f4e424c801a22200db104R233 while it waits for a reference to the registry to be released (was reclaimed 5 times and released 4 on my tests, for example), causing it to wait forever.
For confirmed bugs, please report:
./filebeat -e -v
Logs of the issue:
Stacktrace:
The text was updated successfully, but these errors were encountered: