Skip to content

Fix open file handler issue #2028

Closed
Closed
@ruflin

Description

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions