【问题标题】:Logstash failed to send join request to elasticsearch masterLogstash 无法向 elasticsearch master 发送加入请求
【发布时间】:2015-11-25 14:23:49
【问题描述】:

我的 logstash 出现问题,无法将日志发送到 elaticsearch。

有以下细节

  1. Lo​​gstash 版本:1.5.1
  2. Elasticsearch 版本:1.6.0
  3. 两台服务器上的 jvm 版本:1.8.0
  4. Linux 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  5. Azure Openlogic 7.1

这是我的 logstash.err 文件

INFO: [ls1] failed to send join request to master 
[[es1][e8A0li5pRfeMklozmDXgkQ][elastic][inet[/x.x.x.x:9300]]], reason  
[RemoteTransportException[[es1][inet[/x.x.x.x:9300]]
[internal:discovery/zen/join]]; nested:  
ConnectTransportException[[ls1][inet[/x.x.x.x:9300]] 
connect_timeout[30s]]; nested: ConnectTimeoutException[connection 
timed out: /x.x.x.x:9300]; ]

我的logstash配置输出

output {
  elasticsearch {
    host  => "x.x.x.x"
    bind_port => 9300
    index => "syslog"
    cluster => "test-cluster"
    node_name => 'ls1'
 }
  stdout {
    codec => rubydebug
  }
}

这是我在 elasticsearch 服务器中的 elasticsearch.yml 配置文件

cluster.name: test-cluster
node.name: "es1"
network.bind_host: 0.0.0.0
network.publish_host: <my_elasticsearch_public_ip>
transport.tcp.port: 9300
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["my_logstash_public_ip:9300"]

这是我在 logstash 服务器 (/var/lib/logstash) 中的 elasticsearch.yml 文件

network.publish_host: my_logstash_public_ip
discovery.zen.ping.multicast.enabled: false

我在两台服务器上都允许使用端口 9300。

【问题讨论】:

    标签: azure logstash elasticsearch


    【解决方案1】:

    您需要在您的 logstash 配置中包含协议属性。找到下面的更新代码。

    output {
      elasticsearch {
        host  => "x.x.x.x"
        protocol => "http"
        bind_port => 9300
        index => "syslog"
        cluster => "test-cluster"
        node_name => 'ls1'
     }
    

    【讨论】:

      【解决方案2】:

      我使用 Microsoft Azure VM,现在我可以通过 Azure 虚拟机创建 VPN 连接来解决这个问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-09-28
        • 2023-03-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-08-21
        • 1970-01-01
        相关资源
        最近更新 更多