From issues-return-98559-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Wed Sep 11 10:02:02 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3092D180652 for ; Wed, 11 Sep 2019 12:02:02 +0200 (CEST) Received: (qmail 41154 invoked by uid 500); 11 Sep 2019 10:02:01 -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 41145 invoked by uid 99); 11 Sep 2019 10:02:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2019 10:02:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B35DAE3133 for ; Wed, 11 Sep 2019 10:02:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 222F378052E for ; Wed, 11 Sep 2019 10:02:00 +0000 (UTC) Date: Wed, 11 Sep 2019 10:02:00 +0000 (UTC) From: "Lev Agafonov (Jira)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (IGNITE-12032) Server node prints exception when ODBC driver disconnects 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-12032?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 927441#comment-16927441 ]=20 Lev Agafonov edited comment on IGNITE-12032 at 9/11/19 10:01 AM: ----------------------------------------------------------------- Hello, I investigated the issue, seems that exception is thrown from [this line|ht= tps://github.com/apache/ignite/blob/ignite-2.7.6/modules/core/src/main/java= /org/apache/ignite/internal/util/nio/GridNioServer.java#L2673] I also was able to reproduce this stack trace with following test: =C2=A0 {code:java} import java.sql._ import org.scalatest.{FunSuite, Matchers} class OdbcTest extends FunSuite with Matchers { test("Odbc close connection") { val dsn =3D "Ignite_srv" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") val t =3D new Thread() { override def run() =3D { val conn =3D DriverManager.getConnection(s"jdbc:odbc:$dsn") //conn.close() } } t.start() Thread.sleep(100) t.interrupt() } } {code} As you can see - there is commented 'conn.close()' in my test, and actually= this produces error. Of course, it absolutely normal to close database connection, but it should= be done in proper way, by calling `close` connection method. In my opinion throwing error on unexpectedly closed network connection - is= correct. In case it changed to INFO,=C2=A0 the problem of loosing network = connection will be hidden. So, I suppose that problem should be fixed by correct closing database conn= ection with adding `connection.close()` to client application, before "{col= or:#000000}process using this thin clients is finished".{color} =C2=A0 =C2=A0 was (Author: levagafonov): Hello, I investigated the issue, seems that exception is thrown from [this line|#L= 2673].] I also was able to reproduce this stack trace with following test: =C2=A0 {code:java} import java.sql._ import org.scalatest.{FunSuite, Matchers} class OdbcTest extends FunSuite with Matchers { test("Odbc close connection") { val dsn =3D "Ignite_srv" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") val t =3D new Thread() { override def run() =3D { val conn =3D DriverManager.getConnection(s"jdbc:odbc:$dsn") //conn.close() } } t.start() Thread.sleep(100) t.interrupt() } } {code} As you can see - there is commented 'conn.close()' in my test, and actually= this produces error. Of course, it absolutely normal to close database connection, but it should= be done in proper way, by calling `close` connection method. In my opinion throwing error on unexpectedly closed network connection - is= correct. In case it changed to INFO,=C2=A0 the problem of loosing network = connection will be hidden. So, I suppose that problem should be fixed by correct closing database conn= ection with `connection.close()` to client application, before "{color:#000= 000}process using this thin clients is finished".{color} =C2=A0 =C2=A0 > Server node prints exception when ODBC driver disconnects > --------------------------------------------------------- > > Key: IGNITE-12032 > URL: https://issues.apache.org/jira/browse/IGNITE-12032 > Project: Ignite > Issue Type: Bug > Components: odbc > Affects Versions: 2.7.5 > Reporter: Evgenii Zhuravlev > Priority: Major > Labels: newbie, usability > Fix For: 2.8 > > > Whenever a process using ODBC clients is finished, it's printing in the= =20 > node logs this exception:=20 > {code:java} > *[07:45:19,559][SEVERE][grid-nio-worker-client-listener-1-#30][ClientList= enerProcessor]=20 > Failed to process selector key [s=20 > es=3DGridSelectorNioSessionImpl [worker=3DByteBufferNioClientWorker=20 > [readBuf=3Djava.nio.HeapByteBuffer[pos=3D0 lim=3D8192 cap=3D8192=20 > ], super=3DAbstractNioClientWorker [idx=3D1, bytesRcvd=3D0, bytesSent=3D0= ,=20 > bytesRcvd0=3D0, bytesSent0=3D0, select=3Dtrue, super=3DGridWo=20 > rker [name=3Dgrid-nio-worker-client-listener-1, igniteInstanceName=3Dnull= ,=20 > finished=3Dfalse, heartbeatTs=3D1564289118230, hashCo=20 > de=3D1829856117, interrupted=3Dfalse,=20 > runner=3Dgrid-nio-worker-client-listener-1-#30]]], writeBuf=3Dnull,=20 > readBuf=3Dnull, inRecove=20 > ry=3Dnull, outRecovery=3Dnull, super=3DGridNioSessionImpl=20 > [locAddr=3D/0:0:0:0:0:0:0:1:10800, rmtAddr=3D/0:0:0:0:0:0:0:1:63697, cre= =20 > ateTime=3D1564289116225, closeTime=3D0, bytesSent=3D1346, bytesRcvd=3D588= ,=20 > bytesSent0=3D0, bytesRcvd0=3D0, sndSchedTime=3D156428911623=20 > 5, lastSndTime=3D1564289116235, lastRcvTime=3D1564289116235, readsPaused= =3Dfalse,=20 > filterChain=3DFilterChain[filters=3D[GridNioAsyn=20 > cNotifyFilter, GridNioCodecFilter [parser=3DClientListenerBufferedParser,= =20 > directMode=3Dfalse]], accepted=3Dtrue, markedForClos=20 > e=3Dfalse]]]=20 > java.io.IOException: An existing connection was forcibly closed by the=20 > remote host=20 > at sun.nio.ch.SocketDispatcher.read0(Native Method)=20 > at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)=20 > at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)=20 > at sun.nio.ch.IOUtil.read(IOUtil.java:197)=20 > at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)= =20 > at=20 > org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWork= er.processRead(GridNioServer.java:11=20 > 04)=20 > at=20 > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker= .processSelectedKeysOptimized(GridNi=20 > oServer.java:2389)=20 > at=20 > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker= .bodyInternal(GridNioServer.java:215=20 > 6)=20 > at=20 > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker= .body(GridNioServer.java:1797)=20 > at=20 > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120= )=20 > at java.lang.Thread.run(Thread.java:748)*=20 > {code} > It's absolutely normal behavior when ODBC client disconnects from the nod= e, so, we shouldn't print exception in the log. We should replace it with s= omething like INFO message about ODBC client disconnection. > Thread from user list: http://apache-ignite-users.70518.x6.nabble.com/exc= eptions-in-Ignite-node-when-a-thin-client-process-ends-td28970.html -- This message was sent by Atlassian Jira (v8.3.2#803003)