Logstash 文件节拍至日志存储错误wsarecv,wsasend

Logstash 文件节拍至日志存储错误wsarecv,wsasend,logstash,elastic-stack,logstash-grok,filebeat,Logstash,Elastic Stack,Logstash Grok,Filebeat,我使用的是ELK stack版本5.1.2,我无法将日志从一个工作(节点)发送到中央服务器。我在localhost上配置的所有东西都运行得很好,但在开发环境中却不行。在本地主机上,我使用SSL,但现在我将其关闭。所以我的filebeat的conf文件是: filebeat.prospectors: - input_type: log paths: - e:\logs\*.log document_type: xxx_log output.logstash: hosts: ["x

我使用的是ELK stack版本5.1.2,我无法将日志从一个工作(节点)发送到中央服务器。我在localhost上配置的所有东西都运行得很好,但在开发环境中却不行。在本地主机上,我使用SSL,但现在我将其关闭。所以我的filebeat的conf文件是:

filebeat.prospectors:
- input_type: log

paths:
    - e:\logs\*.log

document_type: xxx_log

output.logstash:
  hosts: ["xxxx:5043"]

logging.level: error
logging.to_syslog: true

logging.files:
  rotateeverybytes: 10485760 # = 10MB
日志存储配置:

input {
    beats {
        port => "5043"
    }
}
filter {
    if [type] == "xxx_log" {     
        multiline {
            pattern => "^TID"
            negate => true
            what => "previous"
            }
        grok {
            break_on_match => false
            match =>  [ "message", "TID: \[%{TIMESTAMP_ISO8601:timestamp}\] %{LOGLEVEL:level} \[%{JAVACLASS:java_class}\] \(%{GREEDYDATA:thread}\) - (?<log_message>(.|\r|\n)*)"]
        }
    }
}
output {
    elasticsearch {
        hosts => [ "localhost:9200" ]
        user => "elastic"
        password => "changeme"
        index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
    }
}
Filebeat开始收集数据,在成功收获后,我获得:

ERR未能发布事件,原因是:write tcp yyyy:51992->xxxx:5043:wsasend:远程主机强制关闭了现有连接。

日志中没有任何记录

防火墙已关闭,当我从端口5043上的工作节点打开telnet时,消息将传到中央服务器,因为日志文件中说,我发送了无效的帧类型,例如,我只发送了一些POST以测试端口5043是否打开。因此,端口是打开的,但橡皮筋是空的。有时,我不知道为什么,我在Filebeat日志中遇到错误:

wsarecv:远程主机强制关闭了现有连接。

此行生成日志存储日志:

11:45:31.094 [nioEventLoopGroup-4-2] ERROR org.logstash.beats.BeatsHandler - Exception: org.logstash.beats.BeatsParser$InvalidFrameProtocolException: Invalid Frame Type, received: 83
13:31:43.139 [nioEventLoopGroup-4-4] ERROR org.logstash.beats.BeatsHandler - Exception: An existing connection was forcibly closed by the remote host
谢谢你的建议。
Jaroslav

Filebeat中的消息通常意味着它正在接收TCP RST,当出现拥塞时,Logstash会这样做。尝试在没有过滤器和只有
stdout
输出(无elasticsearch)的情况下运行Logstash,看看问题是否仍然存在。如果有效,那么检查ES或过滤器是否存在问题。
11:45:31.094 [nioEventLoopGroup-4-2] ERROR org.logstash.beats.BeatsHandler - Exception: org.logstash.beats.BeatsParser$InvalidFrameProtocolException: Invalid Frame Type, received: 83
13:31:43.139 [nioEventLoopGroup-4-4] ERROR org.logstash.beats.BeatsHandler - Exception: An existing connection was forcibly closed by the remote host