# File input in Windows

**URL:** <https://discuss.elastic.co/t/file-input-in-windows/31969>\
**Category:** Logstash\
**Created:** [October 11, 2015, 2:29pm UTC](https://discuss.elastic.co/t/file-input-in-windows/31969 "2015-10-11T14:29:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amir\_Gabay](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Amir\_Gabay](https://discuss.elastic.co/u/Amir_Gabay)\
**Post date:** [October 11, 2015, 2:29pm UTC](https://discuss.elastic.co/t/file-input-in-windows/31969/1 "2015-10-11T14:29:30Z")

</div>

Hi,  
I'm using logstash file input in windows which locks the folder the file resides in.  
I've configured 'stat\_interval =\> 60' so it wouldn't sample the file every second but the folder is still being locked.  
Is there any way to overcome this? Do I must use a different input method than file?

Adding my conf:

input {  
file{  
path =\> ["C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs\portal.log","C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs\tenant.log"]  
start\_position =\> beginning  
stat\_interval =\> 60  
codec =\> multiline {  
pattern =\> "^\s"  
what =\> "previous"  
}   
}  
}  
filter {  
grok {  
match =\> {"message" =\> "%{TIMESTAMP\_ISO8601:logdate} [%{DATA:thread}] (%{DATA:classname}) %{LOGLEVEL:level} - %{GREEDYDATA:log\_message}"}  
}  
}  
output {  
kafka {  
broker\_list =\> "XXX:9092"  
topic\_id =\> "bo\_portal"  
client\_id =\> "boalb004s-01"  
}  
}

Thanks,  
Amir

---

<div class="post-metadata">

**Author:** ![Joe\_Lawson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_lawson/32/3390_2.png) [@Joe\_Lawson](https://discuss.elastic.co/u/Joe_Lawson)\
**Post date:** [October 12, 2015, 1:19pm UTC](https://discuss.elastic.co/t/file-input-in-windows/31969/2 "2015-10-12T13:19:01Z")

</div>

What version are you using? This was supposed to be fixed in 1.5. The  
underlying library is ruby-filewatch so you might want to make a bug there  
or on logstash or both of you can recreate it.

> **[jordansissel/ruby-filewatch](https://github.com/jordansissel/ruby-filewatch/issues)**
>
> ruby-filewatch - ruby api for file watching and tailing.

---

<div class="post-metadata">

**Author:** ![Amir\_Gabay](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Amir\_Gabay](https://discuss.elastic.co/u/Amir_Gabay)\
**Post date:** [October 18, 2015, 9:18am UTC](https://discuss.elastic.co/t/file-input-in-windows/31969/3 "2015-10-18T09:18:39Z")

</div>

Thanks Joe for replying back.  
I'm using the latest 1.5.4, I'll go ahead and report it.

Amir

---

<div class="post-metadata">

**Author:** ![Anantapol](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Anantapol](https://discuss.elastic.co/u/Anantapol)\
**Post date:** [April 1, 2016, 4:32am UTC](https://discuss.elastic.co/t/file-input-in-windows/31969/4 "2016-04-01T04:32:15Z")

</div>

I got the same error in 2.2.0.

Is the problem solved at you end?

---

<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:** [July 6, 2017, 5:04am UTC](https://discuss.elastic.co/t/file-input-in-windows/31969/5 "2017-07-06T05:04:24Z")

</div>


