Logstash-forwarder TLS 握手错误 - 服务器选择了不支持的协议版本 301

Logstash-forwarder TLS 握手错误 - 服务器选择了不支持的协议版本 301

我在 Windows 上遇到了下面的问题。我尝试使用 Linux,它运行正常。

当我跑步时:

.\logstash-forwarder-master.exe -config .\logstash-forwarder2.conf 

使用 logstash-forwarder2.conf:

{
  "network": {
  "servers": [ "10.0.1.136:5034" ],
  "ssl key": "C:\\Program Files (x86)\\logstash-forwarder-master\\certs\\logstash-forwarder.key",
  "ssl certificate": "C:\\Program Files (x86)\\logstash-forwarder-master\\certs\\logstash-forwarder.crt",
  "ssl ca": "C:\\Program Files (x86)\\logstash-forwarder-master\\certs\\logstash-forwarder.crt",

   "timeout": 15
},

"files": [
  {
      "paths": [ 
      "C: \\logs\\example.log"
      ]
  }
 ]
}

我收到以下错误:

Failed to tls handshake with 10.0.1.136 tls: Server selected unsupported protocol version 301

然而当我跑步时:

C:\OpenSSL-Win32\bin\openssl.exe s_client -showcerts -connect 10.0.1.136:5034

我收到:

Loading 'screen' into random state - done
CONNECTED(00000118)
depth=0 C = AU, ST = Some-State, O = Internet Widgits Pty Ltd
verify error:num=18:self signed certificate
verify return:1
depth=0 C = AU, ST = Some-State, O = Internet Widgits Pty Ltd
verify return:1
---
Certificate chain
0 s:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
  i:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
-----BEGIN CERTIFICATE-----
 omitted
-----END CERTIFICATE-----
---
Server certificate
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
issuer=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
---
No client certificate CA names sent
---
SSL handshake has read 1012 bytes and written 621 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : RC4-SHA
    Session-ID: 54B3A8D9594F45F1562FA16A462766CE72918E11A2E92EC1429FFD721F6637E5
    Session-ID-ctx:
    Master-Key: 7C59315873B89D1C8DE678BECDF11F4E458A6B987BB2C8A55548207BD95121156889FC14F1247F38DB1CD0F9D794D050
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1421060929
    Timeout   : 300 (sec)
    Verify return code: 18 (self signed certificate)
---

答案1

没关系,

我卸载了 logstash-forwarder 客户端并安装了另一个 logstash-forwarder 客户端

我得到的是这个错误:

Failed to tls handshake with 10.0.1.136:5034 tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config

我找到了解决办法这里

添加此行

tlsconfig.InsecureSkipVerify = true

现在它运行良好

相关内容