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

Fix open file handler issue #2028

Closed
ruflin opened this issue Jul 13, 2016 · 2 comments
Closed

Fix open file handler issue #2028

ruflin opened this issue Jul 13, 2016 · 2 comments
Labels

Comments

@ruflin
Copy link
Member

ruflin commented Jul 13, 2016

If during the start of a harvester and error happens during opening the file, it can happen that the file descriptor is not properly closed. This error was found in 5.x and is fixed in #2020 but applies also all 1.x filebeat versions.

The openFile method must be adjusted so that also in case of an error during the first file checks, the file descriptor is closed properly: https://github.com/elastic/beats/blob/master/filebeat/harvester/log.go#L151

ruflin added a commit to ruflin/beats that referenced this issue Jul 13, 2016
@urso
Copy link

urso commented Jul 19, 2016

in golang open registers a finalizer with file-handles, closing files after garbage collecting os.File objects.

tsg pushed a commit that referenced this issue Jul 19, 2016
@tsg
Copy link
Contributor

tsg commented Jul 19, 2016

#2029 was merged.

@tsg tsg closed this as completed Jul 19, 2016
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants