您的位置:首页 > 其它

解决logstash1.4.2在windows上文件源读会对文件进行锁定的问题

2015-02-15 14:53 225 查看
解决logstash1.4.2在windows上文件源读会对文件进行锁定的问题

从github上下载useJavatoOpenFile https://github.com/edwinf/ruby-filewatch/tree/useJavatoOpenFile
wget https://github.com/jordansissel/ruby-filewatch/archive/master.zip
以上二选一

1.找到JRubyFileExtension.jar 并把他复制到1.4.2 LOGSTASH_HOME/vendor/bundle/jruby/2.1/gems/filewatch-0.5.1/lib同级目录下

2.将filewatch 文件夹完全复制到1.4.2 LOGSTASH_HOME/vendor/bundle/jruby/2.1/gems/filewatch-0.5.1/lib,2.1为版本号,为了稳定,如有多个版本,都给他复制了.读取jar文件是在tail.rb的第10行

这时应该没问题了.

3.如果有问题可以尝试设置 set CloseAfterRead=true

reference:http://stackoverflow.com/questions/20592142/logstash-elasticsearch-reloads-the-same-data/28523646#28523646

reference2:http://blog.csdn.net/xiaohelong2005/article/details/43833939
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: