# File input does not work (even when stdin does!)

**URL:** <https://discuss.elastic.co/t/file-input-does-not-work-even-when-stdin-does/51007>\
**Category:** Logstash\
**Created:** [May 26, 2016, 2:33am UTC](https://discuss.elastic.co/t/file-input-does-not-work-even-when-stdin-does/51007 "2016-05-26T02:33:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpatani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpatani/32/9953_2.png) [@jpatani](https://discuss.elastic.co/u/jpatani)\
**Post date:** [May 26, 2016, 2:33am UTC](https://discuss.elastic.co/t/file-input-does-not-work-even-when-stdin-does/51007/1 "2016-05-26T02:33:32Z")

</div>

This has been asked before but not sure if it has been resolved.

My logstash config file as a simple file input (specifying a single log file).

When executing, it doesn't read the log file. It does however work when I use stdin and copy/paste that same log file.

(using mac & have brew installed logstash)

---

<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:** [May 26, 2016, 3:41am UTC](https://discuss.elastic.co/t/file-input-does-not-work-even-when-stdin-does/51007/2 "2016-05-26T03:41:07Z")

</div>

The typical causes are:

- The file is older than 24 hours and the file input's `ignore_older` option hasn't been adjusted.
- `start_position => beginning` isn't set.
- `start_position => beginning` _is_ set, but the file input is for some reason tailing the file (e.g. because you added `start_position => beginning` after having started Logstash once for that file) and you need to delete the sincedb file while Logstash is shut down.

---

<div class="post-metadata">

**Author:** ![jpatani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpatani/32/9953_2.png) [@jpatani](https://discuss.elastic.co/u/jpatani)\
**Post date:** [May 26, 2016, 4:03am UTC](https://discuss.elastic.co/t/file-input-does-not-work-even-when-stdin-does/51007/3 "2016-05-26T04:03:08Z")

</div>

ok somehow it does indeed work now and i'm not sure what i changed (the worst type of debugging!)

---

<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, 4:56am UTC](https://discuss.elastic.co/t/file-input-does-not-work-even-when-stdin-does/51007/4 "2017-07-06T04:56:08Z")

</div>


