Ignite thin client retry mechanism is tuned to work with multi-node
clusters where some nodes are expected to fail or restart time to time,
but other nodes remain online. Retry logic tries all known server
addresses, but if all nodes are down, it gives up.
That is why it does not work for you - we don't expect single node clusters.

A workaround is to pass the same address to setAddresses multiple times to
force more aggressive reconnect:
cfg.setAddresses("127.0.0.1:10800", "127.0.0.1:10800", "127.0.0.1:10800")


On Tue, Oct 25, 2022 at 4:23 PM Bernáth Máté <mate.bern...@intalion.hu>
wrote:

>
>
> Hello,
>
> We use this code snippet for the connection:
> *„ClientConfiguration cfg = new ClientConfiguration();*
>
> *cfg = cfg.setReconnectThrottlingPeriod(1000);*
>
> *cfg = cfg.setReconnectThrottlingRetries(2);*
>
> *cfg.setAddresses("127.0.0.1:10800 <http://127.0.0.1:10800>");*
>
> *cfg.setSslMode(SslMode.DISABLED);*
>
>
>
>
>
> *IgniteClient client = Ignition.startClient(cfg);” *We also tried that
> version of this code snippet where we don’t set the
> setReconnectThrottlingPeriod and setReconnectThrottlingRetries parameters.
>
> Best regards,
>
> *Máté Bernáth*
>
> Developer
>
>
>
> Intalion Group
>
> E-mail: mate.bern...@intalion.hu <%20mate.bern...@intalion.hu>
>
> Mobile: +36 70 428 5671
>
> Phone: +36 1 999 6197
>
> H-1012 Budapest, Vérmező út 4.
>
> <https://www.intalion.hu/>
>
>
>
> *Feladó:* Pavel Tupitsyn <ptupit...@apache.org>
> *Küldve:* 2022. október 25., kedd 15:14
> *Címzett:* user@ignite.apache.org
> *Tárgy:* Re: Behavior of java thin client connection
>
>
>
> Hello,
>
>
>
> Can you please share your ClientConfiguration?
>
>
>
> On Tue, Oct 25, 2022 at 2:41 PM Bernáth Máté <mate.bern...@intalion.hu>
> wrote:
>
> Hello,
>
>
>
> The following is our experience using the Apache Ignite.
>
>
>
> We use the Apache Ignite for java applications. These applications are
> part of ESB applications.
>
> For the client connection (between our java application and apache ignite
> server) we use the java thin client connection.
>
>
>
> First we start the apache ignite server. When we start our java
> application the connection is successfully created to the Apache Ignite
> server. The connection is only created once in the java application. After
> the Apache Ignite server is restarted our application call the apache
> ignite to get some data, after that our java application throws this
> exception: org.apache.ignite.client.ClientConnectionException: Channel is
> closed. After few unsuccessful  data requests (1-10 requests) to the apache
> ignite server our java application get the requested data successfully.
>
> We use these java classes to build connection between our java application
> and apache ignite server:
>
>    - org.apache.ignite.configuration.ClientConfiguration
>    - org.apache.ignite.client.IgniteClient
>
>
>
> We also tried to configure the ClientConfiguration java class with
> setReconnectThrottlingPeriod and setReconnectThrottlingRetries methods, but
> it didn’t help to get data faster if the apache ignite server is restarted.
>
>
>
> Versions we use:
>
>    - Apache Ignite server: 2.13.0
>    - Used jar to client connection: ignite-core-2.13.0.jar (
>    https://mvnrepository.com/artifact/org.apache.ignite/ignite-core/2.13.0
>    )
>
> Is it the default and expected behavior when we use java thin client
> connection?
>
>
>
> Best regards,
>
> *Máté Bernáth*
>
> Developer
>
>
>
> Intalion Group
>
> E-mail: mate.bern...@intalion.hu <%20mate.bern...@intalion.hu>
>
> Mobile: +36 70 428 5671
>
> Phone: +36 1 999 6197
>
> H-1012 Budapest, Vérmező út 4.
>
> [image: A képet a feladó eltávolította.] <https://www.intalion.hu/>
>
>
>
> Jelen üzenet és annak mellékletei bizalmas információkat, üzleti titkokat,
> személyes adatokat tartalmazhatnak, azokat kizárólag a címzett ismerheti
> meg, illetve használhatja fel. Felhívjuk a figyelmét, hogy az üzenet és
> mellékletei tartalmának illetéktelen megismerése, tárolása, másolása,
> továbbítása, közzététele, vagy azzal végzett bármely más művelet szigorúan
> tilos. Amennyiben a jelen üzenetet Ön tévedésből kapta, vagy nem Ön az
> üzenet címzettje, kérjük, hogy azt - mellékletekkel együtt - gépéről
> visszavonhatatlanul törölni, és bennünket a fenti e-mail címen
> haladéktalanul értesíteni szíveskedjék.
>
> Jelen üzenet és annak mellékletei bizalmas információkat, üzleti titkokat,
> személyes adatokat tartalmazhatnak, azokat kizárólag a címzett ismerheti
> meg, illetve használhatja fel. Felhívjuk a figyelmét, hogy az üzenet és
> mellékletei tartalmának illetéktelen megismerése, tárolása, másolása,
> továbbítása, közzététele, vagy azzal végzett bármely más művelet szigorúan
> tilos. Amennyiben a jelen üzenetet Ön tévedésből kapta, vagy nem Ön az
> üzenet címzettje, kérjük, hogy azt - mellékletekkel együtt - gépéről
> visszavonhatatlanul törölni, és bennünket a fenti e-mail címen
> haladéktalanul értesíteni szíveskedjék.
>

Reply via email to