Azure Logstash无法向elasticsearch主机发送加入请求
我的日志存储有问题,无法将日志发送到elaticsearch 详情如下:Azure Logstash无法向elasticsearch主机发送加入请求,azure,logstash,
elasticsearch,Azure,Logstash,
elasticsearch,我的日志存储有问题,无法将日志发送到elaticsearch 详情如下: 日志存储版本:1.5.1 Elasticsearch版本:1.6.0 两台服务器上的jvm版本:1.8.0 Linux 3.10.0-229.7.2.el7.x86_64#1 SMP周二6月23日22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Azure Openlogic 7.1 这是我的logstash.err文件 INFO: [ls1] failed to send
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]; ]
我的日志存储配置输出
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"]
我在两台服务器上都允许使用端口9300。我使用Microsoft Azure VM,现在我可以通过Azure虚拟机创建VPN连接来解决此问题。您需要在日志存储配置中包括协议属性。查找以下更新的代码
output {
elasticsearch {
host => "x.x.x.x"
protocol => "http"
bind_port => 9300
index => "syslog"
cluster => "test-cluster"
node_name => 'ls1'
}
output {
elasticsearch {
host => "x.x.x.x"
protocol => "http"
bind_port => 9300
index => "syslog"
cluster => "test-cluster"
node_name => 'ls1'
}