# Logstash shutdown as soon as input file is place into input directory

**URL:** <https://discuss.elastic.co/t/logstash-shutdown-as-soon-as-input-file-is-place-into-input-directory/169053>\
**Category:** Logstash\
**Created:** [February 19, 2019, 3:32pm UTC](https://discuss.elastic.co/t/logstash-shutdown-as-soon-as-input-file-is-place-into-input-directory/169053 "2019-02-19T15:32:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KevinT1](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@KevinT1](https://discuss.elastic.co/u/KevinT1)\
**Post date:** [February 19, 2019, 3:32pm UTC](https://discuss.elastic.co/t/logstash-shutdown-as-soon-as-input-file-is-place-into-input-directory/169053/1 "2019-02-19T15:32:30Z")

</div>

Hi,  
Need help with file input of logstash ver 2.2.1.

Steps to simulate it

1. Empty the input directory
2. Start logstash (in debug where log messages are listed)
3. Place input file into input directory. logstash is shutdown as soon as input file is present.

Following are the messages leading to the shutdown.

{:timestamp=\>"2019-01-15T15:57:22.487000-0600", :message=\>"Pushing flush onto pipeline", :level=\>:debug, :file=\>"logstash/pipeline.rb", :line=\>"450", :method=\>"flush"}  
{:timestamp=\>"2019-01-15T15:57:27.490000-0600", :message=\>"Pushing flush onto pipeline", :level=\>:debug, :file=\>"logstash/pipeline.rb", :line=\>"450", :method=\>"flush"}  
{:timestamp=\>"2019-01-15T15:57:32.492000-0600", :message=\>"Pushing flush onto pipeline", :level=\>:debug, :file=\>"logstash/pipeline.rb", :line=\>"450", :method=\>"flush"}  
{:timestamp=\>"2019-01-15T15:57:36.165000-0600", :message=\>"\_globbed\_files: /tmp/span/_.log: glob is: []", :level=\>:debug, :file=\>"filewatch/watch.rb", :line=\>"326", :method=\>"\_globbed\_files"}  
{:timestamp=\>"2019-01-15T15:57:37.492000-0600", :message=\>"Pushing flush onto pipeline", :level=\>:debug, :file=\>"logstash/pipeline.rb", :line=\>"450", :method=\>"flush"}  
{:timestamp=\>"2019-01-15T15:57:42.493000-0600", :message=\>"Pushing flush onto pipeline", :level=\>:debug, :file=\>"logstash/pipeline.rb", :line=\>"450", :method=\>"flush"}  
{:timestamp=\>"2019-01-15T15:57:47.495000-0600", :message=\>"Pushing flush onto pipeline", :level=\>:debug, :file=\>"logstash/pipeline.rb", :line=\>"450", :method=\>"flush"}  
{:timestamp=\>"2019-01-15T15:57:51.174000-0600", :message=\>"\_globbed\_files: /tmp/span/_.log: glob is: ", :level=\>:debug, :file=\>"filewatch/watch.rb", :line=\>"326", :method=\>"\_globbed\_files"}  
{:timestamp=\>"2019-01-15T15:57:51.834000-0600", :message=\>"SIGTERM received. Shutting down the pipeline.", :level=\>:warn, :file=\>"logstash/agent.rb", :line=\>"193", :method=\>"execute"}  
{:timestamp=\>"2019-01-15T15:57:51.836000-0600", :message=\>"Closing inputs", :level=\>:info, :file=\>"logstash/pipeline.rb", :line=\>"373", :method=\>"shutdown"}  
{:timestamp=\>"2019-01-15T15:57:51.837000-0600", :message=\>"stopping", :plugin=\>\<LogStash::Inputs::File type=\>"http", path=\>["/tmp/span/\*.log"], start\_position=\>"beginning", codec=\>\<LogStash::Codecs::Plain charset=\>"UTF-8"\>, stat\_interval=\>1, discover\_interval=\>15, sincedb\_write\_interval=\>15, delimiter=\>"\n", ignore\_older=\>86400, close\_older=\>3600\>, :level=\>:debug, :file=\>"logstash/inputs/base.rb", :line=\>"81", :method=\>"do\_stop"}

Had verified that logstash has read write permission of the input file and directory.  
As there are lack of clue in why it's shutdown, may i check what are the possible  
reason for this. Besides debug, is there anyway to get more information to the  
shutdown.

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [February 19, 2019, 4:10pm UTC](https://discuss.elastic.co/t/logstash-shutdown-as-soon-as-input-file-is-place-into-input-directory/169053/2 "2019-02-19T16:10:06Z")

</div>

Hi @KevinT1,

could you post your Logstash input config and maybe a few example lines of logs?

And why Logstash version 2.2.1?

---

<div class="post-metadata">

**Author:** ![KevinT1](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@KevinT1](https://discuss.elastic.co/u/KevinT1)\
**Post date:** [February 20, 2019, 2:31pm UTC](https://discuss.elastic.co/t/logstash-shutdown-as-soon-as-input-file-is-place-into-input-directory/169053/3 "2019-02-20T14:31:29Z")

</div>

This link help to resolve my issue,

> <https://stackoverflow.com/questions/37656098/error-while-running-logstash-conf-file>

Found the message below when logstash is started,

NotImplementedError: stat.st\_dev unsupported or native support failed to load  
dev\_major at org/jruby/RubyFileStat.java:205

For info, here the input config,  
input {  
file {  
type =\> "http"  
path =\> ["/tmpc/span/\*.log"]  
start\_position =\> "beginning"  
} # end file  
}

---

<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:** [March 20, 2019, 2:31pm UTC](https://discuss.elastic.co/t/logstash-shutdown-as-soon-as-input-file-is-place-into-input-directory/169053/4 "2019-03-20T14:31:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
