[ 
https://issues.apache.org/jira/browse/IGNITE-11016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Voronkin reassigned IGNITE-11016:
---------------------------------------

    Assignee: Pavel Voronkin

> RecoveryLastReceivedMessage(NEED_WAIT) fails with "Failed to encrypt data 
> (SSL engine error)".
> ----------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-11016
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11016
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Pavel Voronkin
>            Assignee: Pavel Voronkin
>            Priority: Major
>         Attachments: IgniteClientConnectSslTest.java
>
>
> 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)
> { ses.close(); }
> });
>  }
> 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%|#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.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to