是时候用 ES 拯救发际线啦

logstash配置文件引起Pipeline aborted due to error的问题

Logstash | 作者 sailershen | 发布于2019年09月07日 | 阅读数:7509

环境说明:
使用官网的docker镜像,使用官网的安装说明搭建了elasticsearch、logstash、kibana的环境,kibana里发现没有数据,看到logstash有出错信息。
启动logstash镜像的命令:
sudo docker run --rm -it -v /home/elk_vm/logstash/usr/share/logstash/config/:/usr/share/logstash/config/ -v /home/elk_vm/logstash/var/lib/logstash/:/var/lib/logstash/ -v /home/elk_vm/logstash/var/log/logstash/:/var/log/logstash/ --name logstash --network host docker.elastic.co/logstash/logstash:7.3.1

 

 pipelines.yml文件里有一段:
- pipeline.id: conf_logs
path.config: "/usr/share/logstash/config/conf.d/ouyu-conf_logs.conf"

ouyu-conf_logs.conf的内容:
input {
tcp {
port => 10515
type => syslog
}
udp {
port => 10515
type => syslog
}
}

output {
elasticsearch {
hosts => ["192.168.4.10:9200"]
action => "index"
codec => line
index => "conf_logs"
}
}

 
启动Logstash看到错误日志:
Pipeline aborted due to error {:
pipeline_id=>"conf_logs",
:exception=>#<NoMethodError: undefined method `__jcreate_meta!' for #<LogStash::Logging::Logger:0x2f0fe2b8>>,
:backtrace=>["org/jruby/java/addons/KernelJavaAddons.java:29:in `to_java'",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-tcp-6.0.3-java/lib/logstash/inputs/tcp.rb:144:in `register'",
"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:192:in `block in register_plugins'",
"org/jruby/RubyArray.java:1792:in `each'",
"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:191:in `register_plugins'",
"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:292:in `start_inputs'",
"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:248:in `start_workers'",
"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:146:in `run'",
"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:105:in `block in start'"],
:thread=>"#<Thread:0x2ebc4758@/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:102 run>"
} Failed to execute action {:id=>:conf_logs, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<conf_logs>, action_result: false", :backtrace=>nil}

请问这个问题应该从哪个方面去解决?谢谢
 
 
已邀请:

sailershen

赞同来自:

问题解决了,解决方法是ELK三个组件全部使用7.2.1版本,所有的命令和配置文件都没变。
看来7.2.1升级到7.3.1是有些变化的,暂时不想折腾新版本了。

要回复问题请先登录注册