Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Problem:
In case of initiator node haven't joined topology yet (doesn't exist in DiscoCache, but exists in TcpDsicovery ring)
we are writing back new RecoveryLastReceivedMessage(NEED_WAIT)) in the below else clause:
if (unknownNode)
{ U.warn(log, "Close incoming connection, unknown node [nodeId=" + sndId + ", ses=" + ses + ']'); ses.close(); }else {
ses.send(new RecoveryLastReceivedMessage(NEED_WAIT)).listen(new CI1<IgniteInternalFuture<?>>() {
@Override public void apply(IgniteInternalFuture<?> fut)
});
}
In case of SSL such code do encrypt and send concurrently with session.close() which results in exception:
javax.net.ssl.SSLException: Failed to encrypt data (SSL engine error) [status=CLOSED, handshakeStatus=NEED_UNWRAP, ses=GridSelectorNioSessionImpl [worker=GridWorker name=grid-nio-worker-tcp-comm-10, igniteInstanceName=DPL_GRID%DplGridNodeName, finished=false, hashCode=1324367867, interrupted=false, runner=grid-nio-worker-tcp-comm-10-#130%DPL_GRID%DplGridNodeName%AbstractNioClientWorker [idx=10, bytesRcvd=121406754, bytesSent=0, bytesRcvd0=16659, bytesSent0=0, select=true, super=]DirectNioClientWorker [super=], writeBuf=java.nio.DirectByteBuffer[pos=0 lim=10 cap=32768], readBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768], inRecovery=null, outRecovery=null, super=GridNioSessionImpl [locAddr=/10.116.69.208:47100, rmtAddr=/10.53.15.23:55380, createTime=1544502852482, closeTime=0, bytesSent=4076, bytesRcvd=4346, bytesSent0=4076, bytesRcvd0=4346, sndSchedTime=1544502852522, lastSndTime=1544502852522, lastRcvTime=1544502852522, readsPaused=false, filterChain=FilterChain[filters=[, GridConnectionBytesVerifyFilter, SSL filter], accepted=true, markedForClose=true]]]
at org.apache.ignite.internal.util.nio.ssl.GridNioSslHandler.encrypt(GridNioSslHandler.java:380)
at org.apache.ignite.internal.util.nio.ssl.GridNioSslFilter.encrypt(GridNioSslFilter.java:270)
at org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processWriteSsl(GridNioServer.java:1465)
at org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processWrite(GridNioServer.java:1326)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2374)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2138)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1792)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
So initiator receive closed exception instead of NEED_WAIT message which leads to exception scenario.
As result instead of NEED_WAIT loop we retry with exception N times and fail.
Attachments
Attachments
Issue Links
- relates to
-
IGNITE-11054 GridNioServer.processWrite() reordered socket.write and onMessageWritten callback.
- Open
-
IGNITE-11031 Improve test coverage on ssl and fix existing ssl tcp communication spi tests.
- Open
-
IGNITE-11026 Support TcpCommunicationSpi.NeedWaitDelay, TcpCommunicationSpi.MaxNeedWaitDelay in .NET.
- Resolved
- links to