Logstash - IOError Device or resource busy

17 views Asked by At

I'm running into a problem when running logstash we have a CSV file that is generated and uploaded to our server. Most of the time, the file is read and indexed fine however, we've had cases where it's failed to read the CSV file due to the device or resoruce being busy. Given this message from our log.

[filewatch.tailmode.handlers.create][main][3d4054455c431c203d3b50f3936742f89e9efc19570acd95db42ed6628df27cd] failed to open file {:path=>“/mnt-point/csvFile.csv”, :exception=>IOError, :message=>“Device or resource busy”}

Logstash does not attempt to read the file again until the next time we upload the file. I can only think the file is busy being written to and we need to delay reading the file until done. Is their perhaps some way to tell logstash to reread the file after some time has past? Or a way to delay reading the file for X seconds? I was under the impression stat_intervael will tell logstash when to check if any changes or modifications have been made to a file but it seems to try to read the file immediately still.

My logstash file input config is as follows logstash version 7.17

input {
  file {
    path => "/mnt-point/csvFile.csv"
    start_position => "beginning"
    close_older => 30
    sincedb_path => "/dev/null"
    stat_interval => 60
    discover_interval => 15
  }
}

Any help or suggestions would be appreciated thank you

0

There are 0 answers