【发布时间】:2020-10-26 20:25:22
【问题描述】:
我正在尝试将 filebeat 设置为 logstash,并在 filebeat 和 logstash 结束时出现以下错误:
文件节拍;版本:7.7.0 logstash "数字" : "7.8.0"
-
修改/etc/filebeat/filebeat.yml:
启用:真 路径: 评论 output.elasticsearch 未注释的 output.logstash 并添加了主机:["hostname:5044"]
-
修改/etc/logstash/conf.d/beats_elasticsearch.conf:
输入{ 节拍{ 端口 => 5044 } }
#过滤器{ #}
输出{ 弹性搜索{ 主机=> [“主机名:9200”] } }
我启动 filebeat 并得到以下错误:
2020-07-06T08:51:23.912-0700 ERROR [publisher_pipeline_output] pipeline/output.go:106 Failed to connect to backoff(elasticsearch(http://hostname:5044)): Get http://hostname:5044: dial tcp ip_address:5044: connect: connection refused
在下面启动了logstash及其日志:
[INFO ] 2020-07-06 09:00:20.562 [[main]<beats] Server - Starting server on port: 5044
[INFO ] 2020-07-06 09:00:20.835 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO ] 2020-07-06 09:00:45.266 [defaultEventExecutorGroup-4-1] BeatsHandler - [local: x.x.x.x:5044, remote: y.y.y.y:53628] Handling exception: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 71
[WARN ] 2020-07-06 09:00:45.267 [nioEventLoopGroup-2-2] DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 71
请解释我还应该做什么。
启动 filebeat 和 logstash 为:
sudo /usr/share/filebeat/bin/filebeat -e -c /etc/filebeat/filebeat.yml
sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/beats_elasticsearch.conf
谢谢
【问题讨论】:
-
filbeat、logstash和elastic实例在不同的服务器上?
-
这个问题已经解决了。这是版本不匹配,所有服务都在不同的节点上运行