-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client fails to proeperly reconnect to single node cluster after hazelcast server is restarted #6168
Comments
Update 1: As it turned out, I am using
I hope this helps. Note: This issue is only reproducible with 3.5.x branch |
Hi @kedar-joshi Accesing hazelcast from hazelcast listeners itself is mostly not advised. You can do a similar workaround for your case. Thanks for the report. |
@sancar you are correct about listener itself accessing Hazelcast. We knew it was a bad implementation on our part as soon as the cause became clear and thus we changed our implementation according to your suggestion. Thank you for the reply and suggested workaround. |
After a straight forward fix made to offload listener call to Executor, I came accross more problem in the design. Since most of remote requests are blocking if client is not connected to remote(if client has connected to node with saying you are my owner), the operation that trying to connect to cluster and others should be in seperate executor pool. We have two executor pools one is for internal operations and other for alien code to hazelcast like listeners and CompletableFuture.andThen calls. Since these two are doing a remote call that can potentially block on waiting owner address to be determined, cluster thread is moved to singleThreadExecutor to its own. And more cleanup done to differentiate alien and internal executor usage. fixes hazelcast#6168
After a straight forward fix made to offload listener call to Executor, I came across more problem in the design. Since most of remote requests are blocking if client is not connected to remote(if client has connected to node with saying you are my owner), the operation that trying to connect to cluster and others should be in separate executor pool. We have two executor pools one is for internal operations and other for alien code to hazelcast like listeners and CompletableFuture.andThen calls. Since these two are doing a remote call that can potentially block on waiting owner address to be determined, cluster thread is moved to singleThreadExecutor to its own. And more cleanup done to differentiate alien and internal executor usage. fixes hazelcast#6168 forward port of hazelcast#6217
After a straight forward fix made to offload listener call to Executor, I came across more problem in the design. Since most of remote requests are blocking if client is not connected to remote(if client has connected to node with saying you are my owner), the operation that trying to connect to cluster and others should be in separate executor pool. We have two executor pools one is for internal operations and other for alien code to hazelcast like listeners and CompletableFuture.andThen calls. Since these two are doing a remote call that can potentially block on waiting owner address to be determined, cluster thread is moved to singleThreadExecutor to its own. And more cleanup done to differentiate alien and internal executor usage. fixes hazelcast#6168 forward port of hazelcast#6217
After a straight forward fix made to offload listener call to Executor, I came accross more problem in the design. Since most of remote requests are blocking if client is not connected to remote(if client has connected to node with saying you are my owner), the operation that trying to connect to cluster and others should be in seperate executor pool. We have two executor pools one is for internal operations and other for alien code to hazelcast like listeners and CompletableFuture.andThen calls. Since these two are doing a remote call that can potentially block on waiting owner address to be determined, cluster thread is moved to singleThreadExecutor to its own. And more cleanup done to differentiate alien and internal executor usage. fixes hazelcast#6168
Hi,
I ran into following exception while upgrading to version 3.5.2 from version 3.2.3. The scenario is as follows -
I am using following code to configure the client -
Following exception is thrown for every map operation after Hazelcast server is restarted -
As per my analysis, following method in com.hazelcast.client.spi.impl.ClientSmartInvocationServiceImpl.java checks for owner connections but ownerConnectionAddress is always returned as NULL by clientClusterService.getOwnerConnectionAddress(); method, causing almost infinite checks for valid connections.
If you check the following method in com.hazelcast.client.spi.impl.ClusterListenerSupport.java, ownerConnectionAddress is set to NULL in the first line but is never set to a proper value again. This causes getOwnerConnectionAddress() to always return NULL when called from ensureOwnerConnectionAvailable()
The text was updated successfully, but these errors were encountered: