[ https://issues.apache.org/jira/browse/IGNITE-21747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-21747: ------------------------------------ Description: * Thick clients have thin client connector enabled by default * *ClientClusterGroupGetNodesEndpointsResponse* excludes client nodes As a result: * Thin client connects to a thick client node * Gets node endpoints - current connection is not there * Thin client closes current connection immediately The following test demonstrates the problem. While *setForceServerMode* is deprecated, there could be other reasons for other nodes to be unreachable. {code:java} @Test public void testConnectToThickClient() { TcpDiscoverySpi discoSpi = new TcpDiscoverySpi() .setIpFinder(new TcpDiscoveryVmIpFinder(true)) .setForceServerMode(true); IgniteConfiguration igniteCfg = new IgniteConfiguration() .setDiscoverySpi(discoSpi); try (Ignite ignored = Ignition.start(igniteCfg); IgniteClient client = Ignition.startClient(new ClientConfiguration()) ) { assertNotNull(client); } } {code} Potential solutions: * Disable client connector on thick client nodes by default (breaking change?) * Fix *ClientClusterGroupGetNodesEndpointsResponse* to include thick client nodes if connector is enabled, and let the client decide whether to connect to them or not was: * Thick clients have thin client connector enabled by default * *ClientClusterGroupGetNodesEndpointsResponse* excludes client nodes As a result: * Thin client connects to a thick client node * Gets node endpoints - current connection is not there * Thin client closes current connection immediately The following test demonstrates the problem. While *setForceServerMode* is deprecated, there could be other reasons for other nodes to be unreachable. {code:java} @Test public void testConnectToThickClient() { TcpDiscoverySpi discoSpi = new TcpDiscoverySpi() .setIpFinder(new TcpDiscoveryVmIpFinder(true)) .setForceServerMode(true); IgniteConfiguration igniteCfg = new IgniteConfiguration() .setDiscoverySpi(discoSpi); try (Ignite ignored = Ignition.start(igniteCfg); IgniteClient client = Ignition.startClient(new ClientConfiguration()) ) { assertNotNull(client); } } {code} > Thin client: connecting to thick client node is broken > ------------------------------------------------------ > > Key: IGNITE-21747 > URL: https://issues.apache.org/jira/browse/IGNITE-21747 > Project: Ignite > Issue Type: Bug > Components: thin client > Affects Versions: 2.16 > Reporter: Pavel Tupitsyn > Priority: Major > Fix For: 2.17 > > > * Thick clients have thin client connector enabled by default > * *ClientClusterGroupGetNodesEndpointsResponse* excludes client nodes > As a result: > * Thin client connects to a thick client node > * Gets node endpoints - current connection is not there > * Thin client closes current connection immediately > The following test demonstrates the problem. While *setForceServerMode* is > deprecated, there could be other reasons for other nodes to be unreachable. > {code:java} > @Test > public void testConnectToThickClient() { > TcpDiscoverySpi discoSpi = new TcpDiscoverySpi() > .setIpFinder(new TcpDiscoveryVmIpFinder(true)) > .setForceServerMode(true); > IgniteConfiguration igniteCfg = new IgniteConfiguration() > .setDiscoverySpi(discoSpi); > try (Ignite ignored = Ignition.start(igniteCfg); > IgniteClient client = Ignition.startClient(new > ClientConfiguration()) > ) { > assertNotNull(client); > } > } > {code} > Potential solutions: > * Disable client connector on thick client nodes by default (breaking change?) > * Fix *ClientClusterGroupGetNodesEndpointsResponse* to include thick client > nodes if connector is enabled, and let the client decide whether to connect > to them or not -- This message was sent by Atlassian Jira (v8.20.10#820010)