security: [BUG] Continuous SSL exceptions post upgrade from 2.11 to 2.15
Describe the bug
I had a working cluster free of errors, however post upgrade to 2.15 (also tested 2.16) I’m getting a ton of the following error on worker nodes:
[2024-08-12T16:48:40,662][ERROR][o.o.h.n.s.SecureNetty4HttpServerTransport] [opensearch-0] Exception during establishing a SSL connection: java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401) ~[?:?]
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:434) ~[?:?]
at org.opensearch.transport.CopyBytesSocketChannel.readFromSocketChannel(CopyBytesSocketChannel.java:156) ~[transport-netty4-client-2.16.0.jar:2.16.0]
at org.opensearch.transport.CopyBytesSocketChannel.doReadBytes(CopyBytesSocketChannel.java:141) ~[transport-netty4-client-2.16.0.jar:2.16.0]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) [netty-transport-4.1.111.Final.jar:4.1.111.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) [netty-transport-4.1.111.Final.jar:4.1.111.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689) [netty-transport-4.1.111.Final.jar:4.1.111.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652) [netty-transport-4.1.111.Final.jar:4.1.111.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) [netty-transport-4.1.111.Final.jar:4.1.111.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) [netty-common-4.1.111.Final.jar:4.1.111.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.111.Final.jar:4.1.111.Final]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
This message is always identical and I cannot pinpoint it to a specific action performed by OpenSearch. The only thing that’s also repeatedly logged is:
[INFO ][o.o.j.s.JobSweeper ] [opensearch-0] Running full sweep
But I feel it’s a long shot.
I did not see this problem on 2.11 and this only started appearing after upgrading. Has anyone else experienced this? Is there any direction you could recommend me to go other than verifying certificates (already done, none expired, CAs are there, as well as the keys etc). Is there perhaps a way to connect the SSL exception with a specific task that caused it? Was it communication from a specific node? From master node maybe? Was it in regards to snapshots or whatever?
Any help is highly appreciated!
Related component
Other
To Reproduce
- Setup a working cluster on 2.11 with Security plugin
- Upgrade the cluster to 2.15
- Check worker node logs for SSL exceptions
Expected behavior
No SSL exceptions post upgrade
Additional Details
Plugins Security plugin
Screenshots If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- Docker image based OpenSearch 2.15
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 28 (8 by maintainers)
OK folks, I think the mystery is resolved: TLDR; no functional regressions have been introduced.
So pre-2.14.0, the secure HTTP transport didn’t log any exceptions (see please https://github.com/opensearch-project/security/blob/2.13.0.0/src/main/java/org/opensearch/security/ssl/OpenSearchSecuritySSLPlugin.java#L270 where the error handler was set to NOOP).
In 2.14.0 and later, the handler was switched from NOOP to the one which logs (see please https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java#L2125) and here is why the exceptions are appearing now.
The takeaway is that those were present before but swallowed.
Hi. I’m experiencing the same issue. In my OpenSearch cluster on version 2.16.0, the above issue is repeating on coordinating nodes.
The strange thing is that it’s happening exactly once every 10 hours, and almost exclusively on the coordinating nodes.
This happens even when no indexing or query requests are being sent.
I’ve created and tested clusters with different versions, and the same issue doesn’t happen with 2.13.0 and earlier, but only with 2.14.0 and later.
So, I’m not sure, but I suspect it’s related to this commit.
Hi there. Unfortunately, same problem here 😦.
2.15.0and on the new version2.19.1coordinatornode typeI afraid, that all interesting information was provided from previous comments, but if you need something specify, please, let me know.
EDIT: It seems, that this is correct assumption from @kkoki-ctrl :
I can confirm, when I stop the Exporter (
prometheuscommunity/elasticsearch-exporter:v1.8.0), the errors stop as well. Unfortunately, it is not possible to not have monitored OpenSearch cluster in the real world. I mean, not using the exporter isnt solution for us.@reta thanks for the update. Logging is configured at info level and I believe this was the baseline. No specific packages have elevated / suppressed messaging (except for testing that suggested @zane-neo in the first response, that however did not show any relevant messages around SSL exceptions). For the time being I can set
org.opensearch.http.netty4.ssltoFATALuntil I can get the 2.18 image to test with@reta thanks for the debug!
My clusters were provisioned on top of our private cloud, in-house Kubernetes, so all coordinating nodes were behind the LoadBalancer service. I asked our infrastructure team if there is any monitoring job involved.
Thanks again 🙇