# Filebeat is not closig the file descriptor, when the file is deleted/renamed

**URL:** https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-when-the-file-is-deleted-renamed/115819
**Category:** Beats
**Tags:** filebeat
**Created:** [January 17, 2018, 4:00am UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-when-the-file-is-deleted-renamed/115819 "2018-01-17T04:00:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![swethamahesh](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@swethamahesh](https://discuss.elastic.co/u/swethamahesh)
#### Post date: [January 17, 2018, 4:00am UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-when-the-file-is-deleted-renamed/115819/1 "2018-01-17T04:00:04Z")

</div>

Hi,

We didnt had any conclusion on the file descriptor is hanging.

FYI: [https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-once-the-file-is-deleted-](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-once-the-file-is-deleted-)  
renamed/104077

Request to provide some solution on how to go about the file descriptor being hanged.

Thanks,  
Swetha. M

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [January 17, 2018, 10:24am UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-when-the-file-is-deleted-renamed/115819/2 "2018-01-17T10:24:14Z")

</div>

Hi @swethamahesh,

Could you share the logs of filebeat for the period where you do the file renaming? Please run it with these parameters: `-d prospector -v`

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [January 19, 2018, 4:42pm UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-when-the-file-is-deleted-renamed/115819/3 "2018-01-19T16:42:51Z")

</div>

Filebeat is not closing files, cause it hasn't finished processing them yet. There are a number of [close options](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-filebeat-options.html#close-options) per prospector. If filebeat is blocked by stale outputs, the most aggressive is `close_timeout`, which force kills a harvester (file reading process) every N seconds.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 16, 2018, 4:43pm UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-when-the-file-is-deleted-renamed/115819/4 "2018-02-16T16:43:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
