Running logstash in docker, not outputting to file or console :

Running logstash 2.3 with the following conf file :


input {
file {
path => "/var/log/logstash/access_nginx.log"
codec => "line"
sincedb_path => "null"
start_position => "beginning"
}
}

filter {
grok {
match => [ "message" , "%{IPORHOST:http_host} - %{USER:http_user} [%{HTTPDATE:http_timestamp}]"]
}
}

output {
file {
path => "/var/log/logstash/access_nginx_parsed.json"
}
stdout { codec => json }
}


Any idea what might be causing it? The folder is writable from the docker container. Thank you.

sincedb_path => "null"

Do you really want Logstash to use a file named null as the sincedb? Perhaps you meant /dev/null, i.e. effectively disabling sincedb?

Yes, I do wanted to disable the sincedb. After applying your suggestion I still face the same issue.

Please see here my debug logs file :
https://drive.google.com/folderview?id=0B4gW16R_bM2Iamk5VW9GQ1Bsb0U&usp=sharing

Ok, have uploaded a test project exhibiting the issue to github here :

There are 3 tests there

  1. stdio to stdout - which is working fine whatever is typed on console gets processed and output on console using rubydebug formatter.

To run it do the following :

git clone https://github.com/smanukyan/test-logstash.git
cd config-dir
./run.sh stdin-to-stdout
  1. file to stdout - the content from input.log to be processed by logstash and output to stdout :

./run.sh file-to-stdout
NOT WORKING! produces no output.

  1. file to file - the content from input.log to be processed by logstash and output to file :

./run.sh file-to-file
NOT WORKING! no output produced.

Please run the examples on your machine and let me know if you can think of what might be causing it.

Thank you!

I can reproduce the problem but I have no idea what's going on.