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

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.

Hi @KevinT1,

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

And why Logstash version 2.2.1?

This link help to resolve my issue,

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
}

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