logstash / cookbook

Community-driven cookbook of extra logstash documentation, tricks, etc.
http://cookbook.logstash.net
123 stars 101 forks source link

Dir.glob in ruby-filewatcher sometimes returning [] for valid files #12

Closed mneedham closed 11 years ago

mneedham commented 12 years ago

We noticed a problem with our logstash-client whereby it didn't seem to be tailing over 50% of the log files that we'd configured it to watch.

Eventually we tracked it down to a problem in ruby-filewatcher in the watch.rb file in '_discover_file'.

On the first line of that function is a call to 'Dir.glob' which was returning an empty array even for files which we know exist and are accessible by the logstash user.

We're running logstash 1.1.1 (which internally uses the jRuby 1.6.7 interpretor, but on trying out 'Dir.glob' on a local instance of that interpretor we couldn't replicate the problem).

We wrote a hack to help us get around it here -> https://github.com/alphagov/ruby-filewatch/commit/9daaab8381719188af6158acc13996235075df75 - but presumably there's a cleaner solution to this.

Has anyone else experienced this problem?

Mark

jamtur01 commented 11 years ago

This isn't the LogStash project - you should look over here: https://github.com/logstash/logstash or try the #logstash channel on #freenode.

cdeszaq commented 11 years ago

This is related to Log Stash, not the cookbooks, and can be closed.