在 Mapping 里面,将 dynamic 参数设置成 strict 可以拒绝索引包含未知字段的文档。 此条 Tips 由 medcl 贡献。

logstash5.0使用kafka input插件出现异常

Logstash | 作者 db7689206 | 发布于2016年11月10日 | 阅读数:12542

An unexpected error occurred! {:error=>#<NoMethodError: undefined method `each' for nil:NilClass>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-4.0.0/lib/logstash/inputs/kafka.rb:149:in `stop'", "/usr/share/logstash/logstash-core/lib/logstash/inputs/base.rb:89:in `do_stop'", "org/jruby/RubyArray.java:1613:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:374:in `shutdown'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:267:in `stop_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:280:in `shutdown_pipelines'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:280:in `shutdown_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:130:in `shutdown'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:273:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:174:in `run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:68:in `(root)'"]}
已邀请:

db7689206 - 90后屌丝

赞同来自:

数据从filebeat 5.0 中推入 kafka是正常的,使用logstash5.0之后,4.0的logstash-kafka-input 就一直出现异常,kafka的版本是0.9的

wangohyes

赞同来自:

[2016-12-08T23:03:50,675][ERROR][logstash.inputs.kafka    ] Unknown setting 'zk_connect' for kafka
[2016-12-08T23:03:50,678][ERROR][logstash.inputs.kafka    ] Unknown setting 'topic_id' for kafka
[2016-12-08T23:03:50,678][ERROR][logstash.inputs.kafka    ] Unknown setting 'reset_beginning' for kafka
用的kafka0.10.0.0,logstash版本是5.0.2,启动会bao报错,到现在还没找到原因

frank0718

赞同来自:

https://stackoverflow.com/ques ... rking  5.0的配置变了,没这个key

要回复问题请先登录注册