欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

logstash使用webhdfs上传文件出现的问题

时间:2023-04-20

记录一次 logstash 6.5.4使用webhdfs插件向hdfs导入数据错误:

[WARN ][logstash.outputs.webhdfs ] Failed to flush outgoing items {:outgoing_count=>1, :exception=>"LogStash::Error", :backtrace=>["org/logstash/ext/JrubyEventExtLibrary.java:177:in `sprintf'", "/export/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-webhdfs-3.0.6/lib/logstash/outputs/webhdfs.rb:194:in `block in flush'", "org/jruby/RubyArray.java:2481:in `collect'", "/export/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-webhdfs-3.0.6/lib/logstash/outputs/webhdfs.rb:189:in `flush'", "/export/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/buffer.rb:219:in `block in buffer_flush'","org/jruby/RubyHash.java:1343:in `each'", "/export/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/buffer.rb:216:in `buffer_flush'", "/export/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/buffer.rb:159:in `buffer_receive'", "/export/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-webhdfs-3.0.6/lib/logstash/outputs/webhdfs.rb:182:in `receive'", "/export/logstash-6.5.4/logstash-core/lib/logstash/outputs/base.rb:89:in `block in multi_receive'","org/jruby/RubyArray.java:1734:in `each'", "/export/logstash-6.5.4/logstash-core/lib/logstash/outputs/base.rb:89:in `multi_receive'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:114:in `multi_receive'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:97:in `multi_receive'", "/export/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:373:in `block in output_batch'", "org/jruby/RubyHash.java:1343:in `each'", "/export/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:372:in `output_batch'", "/export/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:324:in `worker_loop'", "/export/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:286:in `block in start_workers'"]}

经过分析:
是webhdfs使用不当的原因在官网里的推荐配置是这样

而我没有完全按照该格式

解决方法:

path最终我替换成了/user/ogstash/logs/output.txt加上dt=

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。