I have configured logstash output with three elasticsearch nodes which is in a cluster as below
elasticsearch
{
hosts => ["http://ip1:9200","http://ip2:9200","http://ip3:9200"]
document_id => "%{sessionid}"
index => "index"
}
For testing, if I manually stop one of the nodes I'm getting below error
[WARN ][logstash.outputs.elasticsearch][events] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://ip1:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://ip1:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
I thought even if one of the nodes is inaccessible , other nodes will get data from logstash
Isn't it expected behaviour?? How should I make sure events are getting written to active elasticsearch nodes, even if one of nodes is not reachable??