On Amazon Linux 2 AMI (HVM) - Kernel 5.10, I installed Java-17, Elasticsearch 8.1.1, and Logstash 8.1.1. When I use the file input plugin, logstash hangs.
logstash.yml is
node.name: tester
file.conf is
input {
file {
path => ["/opt/logstash-8.1.1/hello.json"]
start_position => "beginning"
ignore_older => 0
type => "json"
}
}
output {
stdout { codec => rubydebug }
}
hello.json is
{ "x": "Hello, world!!!", "y": 7 }
[2022-03-27T22:10:29,462][INFO ][logstash.inputs.file ][main] No sincedb_path set, generating one based on the "path" setting {:sincedb_path=>"/opt/ls/data/plugins/inputs/file/.sincedb_f6518be85b0684a29aca5c2807851c39", :path=>["/opt/logstash-8.1.1/hello.json"]}
...
[2022-03-27T22:18:15,436][INFO ][filewatch.observingtail ][main][d11e930b2ac8ef6145488d50ae6b014fac82c31a52f52572afac148e286d6054] START, creating Discoverer, Watch with file and sincedb collections
I've tried this with and without ignore_older. Using input { stdin { } }, logstash reads hello.json fine. I've tried this on my macbook monterey 12.2.1 with the same results.
Thank you for your advice.