-
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 hangs if it tries to open a FIFO with no writer #18682
Labels
Team:Services
(Deprecated) Label for the former Integrations-Services team
Comments
botelastic
bot
added
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 21, 2020
benbuzbee
changed the title
Filebeat log input not re-scanning at scan_duration
Filebeat hangs if it tries to open a FIFO with no writer
May 21, 2020
A quick, way to repro is probably (untested)
|
andresrc
added
the
Team:Services
(Deprecated) Label for the former Integrations-Services team
label
May 22, 2020
Pinging @elastic/integrations-services (Team:Services) |
botelastic
bot
removed
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 22, 2020
4 tasks
kvch
added a commit
to kvch/beats
that referenced
this issue
Aug 6, 2020
kvch
added a commit
that referenced
this issue
Aug 6, 2020
## What does this PR do? This PR adds a check before opening a file for harvester Filebeat. If the file is a named pipe, an error is returned and the file is not opened. ## Why is it important? Previously if someone wanted to open a named pipe without a writer, Filebeat hangs. ## Related issues Closes #18682
melchiormoulin
pushed a commit
to melchiormoulin/beats
that referenced
this issue
Oct 14, 2020
## What does this PR do? This PR adds a check before opening a file for harvester Filebeat. If the file is a named pipe, an error is returned and the file is not opened. ## Why is it important? Previously if someone wanted to open a named pipe without a writer, Filebeat hangs. ## Related issues Closes elastic#18682
kvch
added a commit
to kvch/beats
that referenced
this issue
Nov 4, 2020
## What does this PR do? This PR adds a check before opening a file for harvester Filebeat. If the file is a named pipe, an error is returned and the file is not opened. ## Why is it important? Previously if someone wanted to open a named pipe without a writer, Filebeat hangs. ## Related issues Closes elastic#18682 (cherry picked from commit a89d81f)
4 tasks
kvch
added a commit
to kvch/beats
that referenced
this issue
Nov 4, 2020
## What does this PR do? This PR adds a check before opening a file for harvester Filebeat. If the file is a named pipe, an error is returned and the file is not opened. ## Why is it important? Previously if someone wanted to open a named pipe without a writer, Filebeat hangs. ## Related issues Closes elastic#18682 (cherry picked from commit a89d81f)
4 tasks
kvch
added a commit
that referenced
this issue
Nov 6, 2020
…2422) ## What does this PR do? This PR adds a check before opening a file for harvester Filebeat. If the file is a named pipe, an error is returned and the file is not opened. ## Why is it important? Previously if someone wanted to open a named pipe without a writer, Filebeat hangs. ## Related issues Closes #18682 (cherry picked from commit a89d81f)
kvch
added a commit
that referenced
this issue
Nov 6, 2020
…2423) ## What does this PR do? This PR adds a check before opening a file for harvester Filebeat. If the file is a named pipe, an error is returned and the file is not opened. ## Why is it important? Previously if someone wanted to open a named pipe without a writer, Filebeat hangs. ## Related issues Closes #18682 (cherry picked from commit a89d81f)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This line tries to open a file on the main input thread
beats/filebeat/input/log/harvester.go
Line 508 in b0f7ae7
If the file is a Unix FIFO, the open will hang until there is a writer. Since this is the main input thread, it means that no further files that may match the input pattern will be processed.
Suggestion 1:
On linux open with O_NONBLOCK
From http://man7.org/linux/man-pages/man7/fifo.7.html
Suggestion 2:
Skip fifos
Suggestion 3:
Open on a background thread
The text was updated successfully, but these errors were encountered: