Hi guys,
from time to time I have following error on logstash side which is sending the logs to the loadbalancer url (azure loadbalancer):
[2020-07-21T09:45:48,982][WARN ][logstash.outputs.elasticsearch][some_pipeline] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [https://logstash:xxxxxx@elastic.cluster.com:9200/][Manticore::SocketTimeout] Read timed out {:url=>https://logstash:xxxxxx@elastic.cluster.com:9200/, :error_message=>"Elasticsearch Unreachable: [https://logstash:xxxxxx@elastic.cluster.com:9200/][Manticore::SocketTimeout] Read timed out", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
[2020-07-21T09:45:48,991][ERROR][logstash.outputs.elasticsearch][some_pipeline] Attempted to send a bulk request to elasticsearch' but Elasticsearch appears to be unreachable or down! {:error_message=>"Elasticsearch Unreachable: [https://logstash:xxxxxx@elastic.cluster.com:9200/][Manticore::SocketTimeout] Read timed out", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError", :will_retry_in_seconds=>2}
[2020-07-21T09:45:50,842][ERROR][logstash.outputs.elasticsearch][some_pipeline] Attempted to send a bulk request to elasticsearch, but no there are no living connections in the connection pool. Perhaps Elasticsearch is unreachable or down? {:error_message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError", :will_retry_in_seconds=>2}
[2020-07-21T09:45:50,996][ERROR][logstash.outputs.elasticsearch][some_pipeline] Attempted to send a bulk request to elasticsearch, but no there are no living connections in the connection pool. Perhaps Elasticsearch is unreachable or down? {:error_message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError", :will_retry_in_seconds=>4}
[2020-07-21T09:45:51,363][WARN ][logstash.outputs.elasticsearch][some_pipeline] Restored connection to ES instance {:url=>"https://logstash:xxxxxx@elastic.cluster.com:9200/"}
and on the elasticsearch node side I have following:
[2020-07-21T07:45:36,900][ERROR][c.f.s.s.h.n.SearchGuardSSLNettyHttpServerTransport] [elastic01.node.com] Exception during establishing a SSL connection: java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:345) ~[?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:376) ~[?:?]
at org.elasticsearch.transport.CopyBytesSocketChannel.readFromSocketChannel(CopyBytesSocketChannel.java:141) ~[transport-netty4-client-7.6.2.jar:7.6.2]
at org.elasticsearch.transport.CopyBytesSocketChannel.doReadBytes(CopyBytesSocketChannel.java:126) ~[transport-netty4-client-7.6.2.jar:7.6.2]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:600) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:554) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) [netty-common-4.1.43.Final.jar:4.1.43.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.43.Final.jar:4.1.43.Final]
at java.lang.Thread.run(Thread.java:830) [?:?]
the pipeline configuraiton is:
input {
beats {
port => 5044
ssl => true
ssl_certificate => "/logstash.crt"
ssl_key => "/logstash.pkcs8.key"
ssl_key_passphrase => "${LOGSTASH_KEY_PASS}"
}
}
output {
elasticsearch {
hosts => ["https:/elastic.cluster.com:9200"]
index => "some-index-name%{+YYYY.MM.dd}"
ssl => true
ssl_certificate_verification => true
cacert => '/certs/ca.crt'
user => logstash
password => "${LOGSTASH_PASS}"
}
}
Do you have any idea why elasticsearch closes the connection from time to time?