From issues-return-88704-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Tue Jan 22 08:43:50 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 10080180634 for ; Tue, 22 Jan 2019 08:43:49 +0100 (CET) Received: (qmail 63679 invoked by uid 500); 22 Jan 2019 07:43:48 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 63670 invoked by uid 99); 22 Jan 2019 07:43:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2019 07:43:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3A074180801 for ; Tue, 22 Jan 2019 07:43:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id b10kIN-QbE6L for ; Tue, 22 Jan 2019 07:43:46 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E3BCA5FB0F for ; Tue, 22 Jan 2019 07:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4EC7AE00A7 for ; Tue, 22 Jan 2019 07:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D253925685 for ; Tue, 22 Jan 2019 07:36:00 +0000 (UTC) Date: Tue, 22 Jan 2019 07:36:00 +0000 (UTC) From: "Pavel Voronkin (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-11016) RecoveryLastReceivedMessage(NEED_WAIT) fails with "Failed to encrypt data (SSL engine error)". MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-11016?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 748456#comment-16748456 ]=20 Pavel Voronkin commented on IGNITE-11016: ----------------------------------------- Reproducer attached. > 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 > Priority: Major > Attachments: IgniteClientConnectSslTest.java > > > Problem:=C2=A0 > In case of initiator node haven't joined topology yet (doesn't exist in D= iscoCache, but exists in TcpDsicovery ring) > we are writing back=C2=A0new RecoveryLastReceivedMessage(NEED_WAIT)) in t= he below else clause: > if (unknownNode) > { U.warn(log, "Close incoming connection, unknown node [nodeId=3D" + sndI= d + ", ses=3D" + ses + ']'); ses.close(); } > else { > ses.send(new RecoveryLastReceivedMessage(NEED_WAIT)).listen(new CI1>() { > @Override public void apply(IgniteInternalFuture fut) > { ses.close(); } > }); > } > In case of SSL such code do encrypt and send concurrently with session.cl= ose() which results in exception: > javax.net.ssl.SSLException: Failed to encrypt data (SSL engine error) [s= tatus=3DCLOSED, handshakeStatus=3DNEED_UNWRAP, ses=3DGridSelectorNioSession= Impl [worker=3DGridWorker [name=3Dgrid-nio-worker-tcp-comm-10, igniteInstan= ceName=3DDPL_GRID%DplGridNodeName, finished=3Dfalse, hashCode=3D1324367867,= interrupted=3Dfalse, runner=3Dgrid-nio-worker-tcp-comm-10-#130%DPL_GRID%Dp= lGridNodeName%|#130%DPL_GRID%DplGridNodeName%]AbstractNioClientWorker [idx= =3D10, bytesRcvd=3D121406754, bytesSent=3D0, bytesRcvd0=3D16659, bytesSent0= =3D0, select=3Dtrue, super=3D]DirectNioClientWorker [super=3D], writeBuf=3D= java.nio.DirectByteBuffer[pos=3D0 lim=3D10 cap=3D32768], readBuf=3Djava.nio= .DirectByteBuffer[pos=3D0 lim=3D32768 cap=3D32768], inRecovery=3Dnull, outR= ecovery=3Dnull, super=3DGridNioSessionImpl [locAddr=3D/10.116.69.208:47100,= rmtAddr=3D/10.53.15.23:55380, createTime=3D1544502852482, closeTime=3D0, b= ytesSent=3D4076, bytesRcvd=3D4346, bytesSent0=3D4076, bytesRcvd0=3D4346, sn= dSchedTime=3D1544502852522, lastSndTime=3D1544502852522, lastRcvTime=3D1544= 502852522, readsPaused=3Dfalse, filterChain=3DFilterChain[filters=3D[, Grid= ConnectionBytesVerifyFilter, SSL filter], accepted=3Dtrue, markedForClose= =3Dtrue]]] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.ssl.GridNioSslHandler.encrypt(GridNioSslHandler.java= :380) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.ssl.GridNioSslFilter.encrypt(GridNioSslFilter.java:2= 70) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.GridNioServer$DirectNioClientWorker.processWriteSsl(= GridNioServer.java:1465) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.GridNioServer$DirectNioClientWorker.processWrite(Gri= dNioServer.java:1326) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelecte= dKeysOptimized(GridNioServer.java:2374) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(G= ridNioServer.java:2138) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioSe= rver.java:1792) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ig= nite.internal.util.worker.GridWorker.run(GridWorker.java:110) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.Thr= ead.run(Thread.java:745) > =C2=A0 > So=C2=A0initiator receive closed exception instead of NEED_WAIT message w= hich leads to exception scenario. > As result instead of NEED_WAIT loop we=C2=A0retry with exception N times = and fail. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)