You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2020/11/18 12:13:00 UTC

[jira] [Commented] (IGNITE-13719) Thin client silently closes channel after inactivity

    [ https://issues.apache.org/jira/browse/IGNITE-13719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17234543#comment-17234543 ] 

Aleksey Plekhanov commented on IGNITE-13719:
--------------------------------------------

[~ptupitsyn], I don't think it's blocked by IGNITE-13496, I think it can be relatively easy fixed by waiting for future {{pendingReq}} with timeout in {{TcpClientChannel#receive}} instead of timeout on socket. Also, patch can be included to 2.9.1 scope.

> Thin client silently closes channel after inactivity
> ----------------------------------------------------
>
>                 Key: IGNITE-13719
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13719
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: jifwin
>            Assignee: Pavel Tupitsyn
>            Priority: Major
>
> The following code works fine with ignite-core 2.8.0, but fails with 2.9.0 (see the exception below). It looks like timeout is applied to client receiver thread. When it's not used for a while it gets closed silently. 
> {code:java}
> public class IgniteDemo
> {
>     public static final int TIMEOUT = 1000;
>     public static void main(String[] args) throws InterruptedException
>     {
>         new IgniteDemo().run();
>     }
>     public void run() throws InterruptedException
>     {
>         final Ignite igniteServer = Ignition.start();
>         final ClientConfiguration cfg = new ClientConfiguration().setAddresses("127.0.0.1:10800");
>         cfg.setTimeout(TIMEOUT);
>         final IgniteClient igniteClient = Ignition.startClient(cfg);
>         final ClientCache<Object, Object> cache = igniteClient.getOrCreateCache("test");
>         Thread.sleep(TIMEOUT);
>         cache.put(1, 1);
>         Thread.sleep(TIMEOUT);
>         cache.put(2, 2);
>     }
> }
> {code}
> {code:java}
>  
> Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Channel is closedException in thread "main" org.apache.ignite.client.ClientConnectionException: Channel is closed at org.apache.ignite.internal.client.thin.TcpClientChannel.send(TcpClientChannel.java:236) at org.apache.ignite.internal.client.thin.TcpClientChannel.service(TcpClientChannel.java:217) at org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:198) at org.apache.ignite.internal.client.thin.ReliableChannel.affinityService(ReliableChannel.java:261) at org.apache.ignite.internal.client.thin.TcpClientCache.cacheSingleKeyOperation(TcpClientCache.java:508) at org.apache.ignite.internal.client.thin.TcpClientCache.put(TcpClientCache.java:127) at IgniteDemo.run(IgniteDemo.java:26) at IgniteDemo.main(IgniteDemo.java:13)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)