# Logstash 2.2.2 Not reading file input

**URL:** <https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353>\
**Category:** Logstash\
**Created:** [March 3, 2016, 8:53am UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353 "2016-03-03T08:53:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_pkd](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mr\_pkd](https://discuss.elastic.co/u/mr_pkd)\
**Post date:** [March 3, 2016, 8:53am UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353/1 "2016-03-03T08:53:15Z")

</div>

New to logstash. I am trying to read a simple input and output it to command window.

Logstash version: 2.2.2

Below is my .conf file

input {  
file {  
path =\> "/home/pdutt/CollPoll/Data/logstash-test-data.log"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}

output {  
stdout{}  
}

Below is my logstash-test-data.log  
name=n1,age=a1,id=a

This is the output I get after --debug and --verbose

$ logstash -f logstash-test.conf --debug --verbose  
Settings: Default pipeline workers: 4  
Registering file input {:path=\>["/home/pdutt/CollPoll/Data/logstash-test-data.log"], :level=\>:info}  
Starting pipeline {:id=\>"base", :pipeline\_workers=\>4, :batch\_size=\>125, :batch\_delay=\>5, :max\_inflight=\>500, :level=\>:info}  
Pipeline started {:level=\>:info}  
Logstash startup completed

And then nothing happens. I'm expecting the log to be displayed on the terminal.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 3, 2016, 9:30am UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353/2 "2016-03-03T09:30:54Z")

</div>

For a single line you are better off using stdin and then just pasting the line in.

What are you trying to achieve with this method?

---

<div class="post-metadata">

**Author:** ![mr\_pkd](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mr\_pkd](https://discuss.elastic.co/u/mr_pkd)\
**Post date:** [March 3, 2016, 10:25am UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353/3 "2016-03-03T10:25:05Z")

</div>

Here I am just testing the input-file plugin. I have tried using stdin and that works as expected. But it should also work using file input right? I feel like logstash is unable to read the input file.

---

<div class="post-metadata">

**Author:** ![bhatch](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bhatch](https://discuss.elastic.co/u/bhatch)\
**Post date:** [March 4, 2016, 8:05pm UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353/4 "2016-03-04T20:05:23Z")

</div>

I was seeing something similar also. It seemed like sometimes it would load the file, but sometimes it wouldn't. I ended up just using stdin for testing and doing one line at a time. Our production environment doesn't use the file input so it's easy enough for us to just avoid it.

---

<div class="post-metadata">

**Author:** ![bryan\_stuhlsatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryan_stuhlsatz/32/49123_2.png) [@bryan\_stuhlsatz](https://discuss.elastic.co/u/bryan_stuhlsatz)\
**Post date:** [March 6, 2016, 7:42am UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353/5 "2016-03-06T07:42:29Z")

</div>

It is sitting there waiting for an CRLF. Re-open the file with an editor and press Enter/Return to start a new line. If your test case had multiple lines it would have worked.

---

<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:08am UTC](https://discuss.elastic.co/t/logstash-2-2-2-not-reading-file-input/43353/6 "2017-07-06T05:08:14Z")

</div>


