The fix has been merged. Thanks for the contribution, wkhapy123! On Fri, Jun 24, 2022 at 8:57 AM Pavel Tupitsyn <[email protected]> wrote:
> Please request contributor permissions on [email protected] > > On Fri, Jun 24, 2022 at 6:53 AM [email protected] <[email protected]> > wrote: > >> Hi, >> >> I want to contribute to Apache ignite . >> >> Would you please give me the contributor permission? >> below is my account >> ------------------------------ >> [email protected] >> >> >> *From:* [email protected] >> *Date:* 2022-06-23 22:34 >> *To:* Pavel Tupitsyn <[email protected]> >> *Subject:* Re: ignite client can not reconnect to ignite Kubernetes >> cluster,after pod restart >> thank you!i will follow wiki. >> ---Original--- >> *From:* "Pavel Tupitsyn"<[email protected]> >> *Date:* Thu, Jun 23, 2022 22:25 PM >> *To:* "wkhapy123"<[email protected]>;"user"<[email protected]>; >> *Subject:* Re: ignite client can not reconnect to ignite Kubernetes >> cluster,after pod restart >> >> > I want to fix this bug . I think it is good opportunity to study ignite. >> >> Great! Please go ahead. >> Make sure to check our wiki, register as a contributor, and assign the >> ticket to yourself. >> >> >> https://cwiki.apache.org/confluence/plugins/servlet/mobile?contentId=177047163#content/view/177047163 >> >> >> On Thu, Jun 23, 2022, 17:02 [email protected] <[email protected]> >> wrote: >> >>> >>> I want to fix this bug . I think it is good opportunity to study ignite. >>> ---Original--- >>> *From:* "[email protected]"<[email protected]> >>> *Date:* Thu, Jun 23, 2022 21:41 PM >>> *To:* "Pavel Tupitsyn"<[email protected]>; >>> *Subject:* Re: ignite client can not reconnect to ignite Kubernetes >>> cluster,after pod restart >>> >>> I am interested in ignite >>> >>> ---Original--- >>> *From:* "[email protected]"<[email protected]> >>> *Date:* Thu, Jun 23, 2022 21:37 PM >>> *To:* "Pavel Tupitsyn"<[email protected]>; >>> *Subject:* Re: ignite client can not reconnect to ignite Kubernetes >>> cluster,after pod restart >>> >>> can I repair it >>> >>> ---Original--- >>> *From:* "Pavel Tupitsyn"<[email protected]> >>> *Date:* Thu, Jun 23, 2022 20:17 PM >>> *To:* "user"<[email protected]>; >>> *Subject:* Re: Re: ignite client can not reconnect to ignite Kubernetes >>> cluster,after pod restart >>> >>> It is a bug - addresses are not reloaded from AddressFinder on >>> connection loss, so we still try old pod address and fail: >>> https://issues.apache.org/jira/browse/IGNITE-17217 >>> >>> Thanks for reporting this. >>> >>> On Thu, Jun 23, 2022 at 3:00 PM [email protected] <[email protected]> >>> wrote: >>> >>>> as you can see,address is 104 >>>> but addressFinder.getAddress new ip is 87,and retrylimit is 5 (i set) >>>> ------------------------------ >>>> [email protected] >>>> >>>> >>>> *From:* [email protected] >>>> *Date:* 2022-06-23 16:02 >>>> *To:* Maksim Timonin <[email protected]> >>>> *Subject:* Re: Re: ignite client can not reconnect to ignite >>>> Kubernetes cluster,after pod restart >>>> sorry i did not add,i will add and retry. >>>> >>>> ------------------------------ >>>> [email protected] >>>> >>>> >>>> *From:* Maksim Timonin <[email protected]> >>>> *Date:* 2022-06-23 15:55 >>>> *To:* user <[email protected]>; wkhapy123 <[email protected]> >>>> *Subject:* Re: Re: ignite client can not reconnect to ignite >>>> Kubernetes cluster,after pod restart >>>> Did you set any value to `ClientConfiguration#setRetryLimit`? If you >>>> check it with a single pod then any value greater than 1 should help (2 or >>>> 3). >>>> >>>> Could you please confirm that you have the failure even with this >>>> setting? >>>> >>>> On Thu, Jun 23, 2022 at 10:49 AM [email protected] < >>>> [email protected]> wrote: >>>> >>>>> Hi: >>>>> i find it still get Connection timed out exeception. >>>>> and i add cfg.setPartitionAwarenessEnabled(true). >>>>> and its errorMsg >>>>> org.apache.ignite.client.ClientConnectionException: Connection timed >>>>> out >>>>> at >>>>> org.apache.ignite.internal.client.thin.io.gridnioserver.GridNioClientConnectionMultiplexer.open(GridNioClientConnectionMultiplexer.java:144) >>>>> at >>>>> org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:178) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.getOrCreateChannel(ReliableChannel.java:917) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.getOrCreateChannel(ReliableChannel.java:898) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.access$200(ReliableChannel.java:847) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:759) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:731) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:167) >>>>> at >>>>> org.apache.ignite.internal.client.thin.ReliableChannel.request(ReliableChannel.java:288) >>>>> at >>>>> org.apache.ignite.internal.client.thin.TcpIgniteClient.getOrCreateCache(TcpIgniteClient.java:185) >>>>> at >>>>> io.naza.vest.dao.impl.IgniteDAOImpl.getCache(IgniteDAOImpl.java:204) >>>>> >>>>> and i remote debug client in k8s >>>>> >>>>> class GridNioClientConnectionMultiplexer >>>>> >>>>> address is 81 >>>>> but after ignite restart address is 104. >>>>> so i think address not refresh automatic. >>>>> and address only get in >>>>> ReliableChannel.class >>>>> initChannelHolders method >>>>> and address refresh in >>>>> i think >>>>> this place also need refresh >>>>> >>>>> >>>>> ------------------------------ >>>>> [email protected] >>>>> >>>>> >>>>> *From:* Maksim Timonin <[email protected]> >>>>> *Date:* 2022-06-23 13:53 >>>>> *To:* user <[email protected]> >>>>> *Subject:* Re: ignite client can not reconnect to ignite Kubernetes >>>>> cluster,after pod restart >>>>> Hi, >>>>> >>>>> Please, try to use `ClientConfiguration#setRetryLimit` additionally to >>>>> `ClientRetryAllPolicy`. It should help you. Please let me know if it >>>>> solves >>>>> the issue or not. >>>>> >>>>> Thanks! >>>>> >>>>> >>>>> On Wed, Jun 22, 2022 at 8:02 AM Ilya Korol <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Please take look to >>>>>> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/client/ClientAddressFinder.html, >>>>>> >>>>>> according to this ThinClientKubernetesAddressFinder should refresh >>>>>> address list on client connection failure, or you can try to set >>>>>> *paritionAwareness >>>>>> = true* in *ClientConfiguration*, that should force ip finder to >>>>>> proactively refresh address list. >>>>>> >>>>>> On 2022/06/22 01:53:38 f cad wrote: >>>>>> > below if client code config >>>>>> > KubernetesConnectionConfiguration kcfg = new >>>>>> > KubernetesConnectionConfiguration(); >>>>>> > >>>>>> > >>>>>> kcfg.setNamespace(igniteK8sNameSpace);kcfg.setServiceName(igniteK8sServiceName);cfg.setAddressesFinder(new >>>>>> > ThinClientKubernetesAddressFinder(kcfg));cfg.setRetryPolicy(new >>>>>> > ClientRetryAllPolicy()); >>>>>> > >>>>>> > >>>>>> > after ignite pod restart >>>>>> > >>>>>> > client throw >>>>>> Exceptionorg.apache.ignite.client.ClientConnectionException: >>>>>> > Connection timed out >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.io.gridnioserver.GridNioClientConnectionMultiplexer.open(GridNioClientConnectionMultiplexer.java:144) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:178) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.getOrCreateChannel(ReliableChannel.java:917) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.getOrCreateChannel(ReliableChannel.java:898) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.access$200(ReliableChannel.java:847) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:759) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:731) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:167) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.ReliableChannel.request(ReliableChannel.java:288) >>>>>> > at >>>>>> org.apache.ignite.internal.client.thin.TcpIgniteClient.getOrCreateCache(TcpIgniteClient.java:185) >>>>>> > >>>>>> > and i use retry to reconnect and print >>>>>> > clientConfiguration.getAddressesFinder().getAddresses() and it >>>>>> address is >>>>>> > pod address,but client not reconnect >>>>>> > >>>>>> > while (retryTimeTmp < retryTimes) { >>>>>> > try { >>>>>> > return igniteClient.getOrCreateCache(new >>>>>> > ClientCacheConfiguration() >>>>>> > .setName(cacheName) >>>>>> > .setAtomicityMode(TRANSACTIONAL) >>>>>> > .setCacheMode(PARTITIONED) >>>>>> > .setBackups(2) >>>>>> > .setWriteSynchronizationMode(PRIMARY_SYNC)); >>>>>> > }catch (Exception e) { >>>>>> > LOGGER.error("get cache [{}] not success", cacheName, e); >>>>>> > LOGGER.error("get address info [{}], ipfinder [{}]", >>>>>> > clientConfiguration.getAddresses(), >>>>>> > clientConfiguration.getAddressesFinder().getAddresses()); >>>>>> > >>>>>> > retrySleep(); >>>>>> > } finally { >>>>>> > retryTimeTmp++; >>>>>> > } >>>>>> > >>>>>> >>>>>
