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
Hazelcast csharp client heartbeat problem #170
Comments
Hi @simpleusr , Is there a simple unit test or demo app that I can reproduce the bug locally. |
Hi @asimarslan , Thanks for the interest. I will also try to reproduce in local server but the config is simple. We have two node hazelcast cluster running on ibm aix server . Hazelcast version is 3.9. We have .net client configured as follows:
The listener class is as follows:
As I said I will also try to locally reproduce the issue. But please note once again that we do not have this problem in the very similar java client... |
Hi @asimarslan , I managed to create a reproducer for the problem. You can find the repo at https://github.com/simpleusr/hazelcastcsharpclientproblem Here are the steps to reproduce:
At this point you have a cluster in local host with two members.
This app continuously publishes TopicData to hazelcastSampleTopic ..
(dotnetclienttopiclistener\HazelcastDotNetProblem\Program) This is the sample client app listening TopicData messages from hazelcastSampleTopic . I reproduced the scenario several times and here is what is happening. Cluster Member logs: 2018-06-19 13:42:26,470 : [INFO ] [hz._hzInstance_1_dev.IO.thread-Acceptor][TcpIpAcceptor] [localhost]:9001 [dev] [3.9] Accepting socket connection from /127.0.0.1:54182 C# client logs: 2018-06-19 13:42:26,508 [hz-striped-scheduler-2] INFO HazelcastDotNetProblem.CustomLogFactory+CustomLogger - Members [2] { As you can see, Around 13:42:26 client successfully connects to cluster. Later on around 13:47:40 cluster closes socket due to heartbeat faılure and client reconnects again. What is worse is that, we sometimes see that topic listening completely stops. I think this is the similar issue pointed in: Please let me know if you have any problems in reproducing.. Regards |
Same as this java client bug: hazelcast/hazelcast#13576 |
Hi,
This question was previously asked at:
https://groups.google.com/forum/#!topic/hazelcast/rImP_5SRnYk
Since we do not have any feedback I am repeating the same question..
We are trying to use hazelcast messaging system via topic.
We have client - server mode usage . Our hazelcast verison is 3.9. Producer application is java based and we have c# client topic listeners.
Our throughput is moderately high about 20 publishes per second.
The problem we are facing is that after a certain time c# client application starts, cluster member closes the connection to client due to heartbeat failure :
2018-06-13 07:57:22,674 : [INFO ] [hz._hzInstance_1_dev.async.thread-24][AuthenticationMessageTask] [hzlhost]:9000 [dev] [3.9] Received auth from Connection[id=26392, /hzlhostip:9000->/clientip:50004, endpoint=null, alive
=true, type=CSHARP_CLIENT], successfully authenticated, principal: ClientPrincipal{uuid='3c924baf-6e0c-49fe-8151-e541e835704b', ownerUuid='9f253cd0-8115-4a0d-90d8-f3c752090612'}, owner connection: true, client version: 3.9
2018-06-13 08:30:38,530 : [INFO ] [hz._hzInstance_1_dev.cached.thread-2][TcpIpConnection] [hzlhost]:9000 [dev] [3.9] Connection[id=26392, /hzlhostip:9000->clientip/clientip:50004, endpoint=[clientip]:50004, aliv
e=false, type=CSHARP_CLIENT] closed. Reason: Client heartbeat is timed out, closing connection to Connection[id=26392, /hzlhostip:9000->clientip/clientip:50004, endpoint=[clientip]:50004, alive=true, type=CSHARP_CLI
ENT]. Now: 2018-06-13 08:30:38.530. LastTimePacketReceived: 2018-06-13 08:25:31.445
2018-06-13 08:30:38,531 : [INFO ] [hz._hzInstance_1_dev.event-5][ClientEndpointManager] [hzlhost]:9000 [dev] [3.9] Destroying ClientEndpoint{connection=Connection[id=26392, 0.0.0.0/0.0.0.0:9000->clientip/clientip:50004,
endpoint=[clientip]:50004, alive=false, type=CSHARP_CLIENT], principal='ClientPrincipal{uuid='3c924baf-6e0c-49fe-8151-e541e835704b', ownerUuid='9f253cd0-8115-4a0d-90d8-f3c752090612'}, firstConnection=true, authenticated=true, c
lientVersion=3.9, creationTime=1528865842673, latest statistics=null}
Please note that we are using default values for hazelcast.client.heartbeat.interval, hazelcast.client.heartbeat.timeout configuration.
What is very strange is that, when I switch to java client from same client host this problem does NOT occur...
We see the initial connection and this does not get closed afterwards like c# client..
2018-06-13 08:42:12,548 : [INFO ] [hz._hzInstance_1_dev.async.thread-15][AuthenticationMessageTask] [hzlhost]:9000 [dev] [3.9] Received auth from Connection[id=26509, /hzlhostip:9000->/clientip:51391, endpoint=null, alive
=true, type=JAVA_CLIENT], successfully authenticated, principal: ClientPrincipal{uuid='5d3b8b5e-c77d-47d9-a6dc-3ba4f722c66a', ownerUuid='9f253cd0-8115-4a0d-90d8-f3c752090612'}, owner connection: true, client version: 3.9
The client code is very simple. We just log the incoming message. We could not find out why we have problem in c# client but not in java client from the same host..
As far as I understand , heartbeat management from c# client is done in this class:
https://github.com/hazelcast/hazelcast-csharp-client/blob/master/Hazelcast.Net/Hazelcast.Client.Connection/ClientConnectionManager.cs
We implemented hazelcast logging interface and do not see any warnings like "Heartbeat failed to connection" and etc.
Any help is appreciated...
The text was updated successfully, but these errors were encountered: