# Logstash not reading file in windows

**URL:** <https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723>\
**Category:** Logstash\
**Created:** [February 14, 2016, 4:43pm UTC](https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723 "2016-02-14T16:43:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smitha\_Bipin](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@Smitha\_Bipin](https://discuss.elastic.co/u/Smitha_Bipin)\
**Post date:** [February 14, 2016, 4:43pm UTC](https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723/1 "2016-02-14T16:43:18Z")

</div>

Hi ,  
I am a newbie to logstash and configured the logstash.conf as follows:  
input {  
file  
{  
path =\> "C:\log4j\log.out"  
start\_position =\> "beginning"  
}

}

filter {  
grok {  
match =\> { "message" =\> "%{COMBINEDAPACHELOG} " }  
}  
date {  
match =\> ["timestamp" , "dd/MMM/yyyy:HH:mm:ss Z"]  
}  
}

output {  
elasticsearch { hosts =\> ["localhost:9200"] }  
stdout { codec =\> rubydebug }  
}

My log file is as follows: I am trying to test with the log files to have a working model.

2016-02-42 14:26:15 INFO HelloNew:26 - Hello World  
2016-02-42 14:26:15 DEBUG HelloNew:27 - Temperature set to {}. Old temperature was {}.  
2016-02-43 14:11:27 INFO HelloNew:26 - Hello World  
2016-02-43 14:11:27 DEBUG HelloNew:27 - Temperature set to {}. Old temperature was {}.

I am not seeing the stdout at all indicating it is parsed.  
A couple of days ago, I was able to get it working with logs in an external drive log file.  
Elastisearch is communicating properly with logstash.

I have logstash 2.2.0 the latest along with latest elastisearch.  
Please help

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 14, 2016, 4:52pm UTC](https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723/2 "2016-02-14T16:52:42Z")

</div>

Logstash is most likely tailing log.out. To ensure that Logstash's file input parses a file from the start every time you run it, set the input's `sincedb_path` to "nul". I haven't tried that on Windows but it should work. Alternatively, set `sincedb_path` to a fixed file path and delete that file to make Logstash forget about parsing the input file. How sincedb works is explained in the input plugin's documentation.

---

<div class="post-metadata">

**Author:** ![Smitha\_Bipin](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@Smitha\_Bipin](https://discuss.elastic.co/u/Smitha_Bipin)\
**Post date:** [February 14, 2016, 10:58pm UTC](https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723/3 "2016-02-14T22:58:08Z")

</div>

Thanks a lot, It started working when I created some logs through the application.  
I appreciate the help!

---

<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:11am UTC](https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723/4 "2017-07-06T05:11:34Z")

</div>


