# Logstash locks file on Windows Server

**URL:** <https://discuss.elastic.co/t/logstash-locks-file-on-windows-server/31443>\
**Category:** Logstash\
**Created:** [October 1, 2015, 7:21am UTC](https://discuss.elastic.co/t/logstash-locks-file-on-windows-server/31443 "2015-10-01T07:21:59Z")\
**Posts on this page:** 4\
**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 1, 2015, 7:21am UTC](https://discuss.elastic.co/t/logstash-locks-file-on-windows-server/31443/1 "2015-10-01T07:21:59Z")

</div>

Hi,  
I've logstash 1.5.4 running on Win server 2008 R2.  
Its locking my application log, allowing it to rotate but it can't be deleted.  
My conf looks like this:

input {  
file{  
path =\> ["C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs\XXX.log","C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs\XXX.log"]  
start\_position =\> beginning  
}  
}  
filter {  
grok {  
match =\> {"message" =\> "%{TIMESTAMP\_ISO8601:logdate} [%{DATA:thread}] (%{DATA:classname}) %{LOGLEVEL:level} - %{GREEDYDATA:log\_message}"}  
}  
}  
output {  
kafka {  
broker\_list =\> "XXX:9092"  
topic\_id =\> "XXX"  
client\_id =\> "XXX"  
}  
}

Is there a plugin or configuration to fix that?

Thanks,  
Amir

---

<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 1, 2015, 12:08pm UTC](https://discuss.elastic.co/t/logstash-locks-file-on-windows-server/31443/2 "2015-10-01T12:08:05Z")

</div>

Providing more info:  
Logs can rotate and change, logstash is locking the log folder which prevent me from actions like upgrading my application (delete\rename log folder).

Thanks,  
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:18am UTC](https://discuss.elastic.co/t/logstash-locks-file-on-windows-server/31443/3 "2016-04-01T04:18:16Z")

</div>

I got the same issue. Looking for a solution.

Anantapol

---

<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/logstash-locks-file-on-windows-server/31443/4 "2017-07-06T05:04:25Z")

</div>


