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/10/19 09:16:00 UTC

[jira] [Commented] (IGNITE-12742) Thick client: client hangs when trying to connect to port 10800

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

Aleksey Plekhanov commented on IGNITE-12742:
--------------------------------------------

[~surkov], client not hangs, client tries to reconnect within given join timeout (TcpDiscoverySpi.setJoinTimeout), if timeout is 0, then it makes infinite retries count. There is a message in the log to warn about this:
{noformat}
Failed to connect to any address from IP finder (will retry to join topology every 2000 ms; change 'reconnectDelay' to configure the frequency of retries)
{noformat}
The same behavior will be if you set not existing port number. 
I think such behavior is the most appropriate way to provide high availability to thick clients, so it's not an issue. You can setup join timeout if you expect to not retries infinitely.
From a thin client point of view, there is also the handshake timeout exists (on server-side), so, if some client uses a malformed handshake request (like thick client connected to 10800) connection will be closed after handshake timeout riched.


> Thick client: client hangs when trying to connect to port 10800
> ---------------------------------------------------------------
>
>                 Key: IGNITE-12742
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12742
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Surkov Aleksandr
>            Priority: Major
>
> If connect by thick client to port 10800(port of thin client) then program can be hanging.
> It would be great to receive message about protocol non-compliance.
> {code:java}
> public class HangingThickClient extends GridCommonAbstractTest {
>     private static final String CLIENT = "client";
>     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
>         final IgniteConfiguration configuration = new IgniteConfiguration()
>             .setIgniteInstanceName(igniteInstanceName);
>         if (igniteInstanceName.startsWith(CLIENT)) {
>             configuration
>                 .setClientMode(true);
>         }
>         final Set<String> addresses = igniteInstanceName.startsWith(CLIENT) ? Collections.singleton("127.0.0.1:10800") :
>                         Collections.singleton("127.0.0.1:47500..47509");
>         configuration.setDiscoverySpi(
>             new TcpDiscoverySpi()
>                 .setIpFinder(
>                     new TcpDiscoveryVmIpFinder(true)
>                         .setAddresses(addresses)
>                 )
>             );
>         return configuration;
>     }
>     @Test
>     public void hangingThickClientTest() throws Exception {
>         Ignite server = startGrid();
>         Ignite client = Ignition.start(getConfiguration(CLIENT));
>     }
> }{code}



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