On a Windows machine, I am trying to add some data with Logstash to Elasticsearch, using the following output configuration in
hosts => "https://localhost:9200"
ssl => true
ssl_certificate_verification => false
user => logstash
password => logstash
ilm_enabled => false
index => "logstash"
The logstash.bat executes without errors, although with some warnings.
However, from field
audit_request_exception_stacktrace, I get the following in Kibana:
java.net.SocketException: Connection reset at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:345) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:376) at org.elasticsearch.transport.CopyBytesSocketChannel.readFromSocketChannel(CopyBytesSocketChannel.java:141)
As shown in the following picture:
Connection reset simply means that a TCP RST was received. This happens when your peer receives data that it can’t process, and there can be various reasons for that. The simplest is when you close the socket, and then write more data on the output stream. By closing the socket, you told your peer that you are done talking, and it can forget about your connection. When you send more data on that stream anyway, the peer rejects it with an RST to let you know it isn’t listening.
Hey @Trelipks ,
did you manage to resolve this issue? or found a root cause of it? If so, could you maybe share what was the reason for the
What version of logstash and ODFE did you use?
Hey @pablo ,
in my case, I’m not using logstash (no issues with logstash so far) but the client-application is using HighLevelRest Client, and typically that is just a normal (benchmarking call) towards ODFE.
Maybe I can also give a bit more context: The ODFE is setup via Docker Swarm on the overlay network using
endpoint_mode: dnsrr. There have been some improvements by updating the default values on TCP Keepalive which stops connection timeouts (this improvements may be also be related to this fix https://github.com/opendistro-for-elasticsearch/security/pull/1061 that I did upgrade to the latest ODFE version 1.13.1 from 1.13.0, but can’t confirm this without further tests).
Even there aren’t any timeouts anymore, I’m still getting such errors:
java.net.SocketException: Connection reset
but hard to really trace it to know from where it is coming (it may also be influenced by the load-balancer, but it isn’t happening to the other cluster).
I know that it even may be related to the env – but just wanted to share this so that we can share the solution if this did happen to someone else.
Thanks for update. I’ll see if I can repro that.