Sincedb write error despite proper permissions

Hi,

I installed LS 6.0 on Linux (2.6.18, centos). I have an error logged whenever LS attempts to write to a sincedb (not in the default folder), could you please help me finding out what is wrong ?

All kind of help is appreciated !

Olivier (config and debug logs follow)

Here is my pipeline configuration:

input
{
        file {
                path => "/home/logstash/gzfiles/file01.txt"
                sincedb_path =>"/data_bkp/logstash/test_sincedb/sincedb_file01"
        }
}

filter
{
}

output {
        stdout {codec => rubydebug}
}

On startup the sincedb file is created as expected (I have checked that LS is running as user logstash and group logstash):

[2017-12-18T14:34:36,967][DEBUG][logstash.inputs.file ] _globbed_files: /home/logstash/gzfiles/file01.txt: glob is: ["/home/logstash/gzfiles/file01.txt"]
[2017-12-18T14:34:36,968][DEBUG][logstash.inputs.file ] _discover_file: /home/logstash/gzfiles/file01.txt: new: /home/logstash/gzfiles/file01.txt (exclude is )
[2017-12-18T14:34:36,975][DEBUG][logstash.inputs.file ] _open_file: /home/logstash/gzfiles/file01.txt: opening
[2017-12-18T14:34:36,976][DEBUG][logstash.inputs.file ] /home/logstash/gzfiles/file01.txt: initial create, no sincedb, seeking to end 312

Then I add a line to the input file, the data is indeed received and processed but I get the following message:

[2017-12-18T14:34:47,207][DEBUG][logstash.inputs.file ] _sincedb_write: error: /data_bkp/logstash/test_sincedb/sincedb_file01: Permission denied - No message available
[2017-12-18T14:34:51,233][DEBUG][logstash.inputs.file ] _globbed_files: /home/logstash/gzfiles/file01.txt: glob is: ["/home/logstash/gzfiles/file01.txt"]
[2017-12-18T14:34:51,989][DEBUG][logstash.pipeline ] Pushing flush onto pipeline {:pipeline_id=>"gztest1", :thread=>"#<Thread:0x1c9d0ca@/opt/logstash-6.0.1/logstash-core/lib/logstash/pipeline.rb:290 sleep>"}

Since the file is created w/o problem, I don't understand where the permission problem comes from. I double checked that it is ok (all above directories have r and x bit set for 'others'):

[logstash@gsrecs01 gzfiles]$ ls -al /data_bkp/logstash/test_sincedb/
drwxrwxr-x 2 logstash logstash 64 Dec 18 14:34 .
drwxr-xr-x 2 logstash logstash 64 Dec 18 13:46 ..
-rw-rw-r-- 1 logstash logstash 19 Dec 18 14:34 sincedb_file01

I finally found out why: my sincedb file is created on a network drive, and the file input is not guaranteed/designed to work on non-local network volumes as specified in the doc...

Hope this helps not only me :slight_smile:

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