Skip to content
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 re-connection problem after shutdown #220

Closed
FrancoisRouviere opened this issue Jul 30, 2012 · 0 comments

Comments

Projects
None yet
2 participants
@FrancoisRouviere
Copy link

commented Jul 30, 2012

I experienced problem while retrieveing queue after a re-connection, here is the scenario:

1 - I start 2 hazelcast servers instances on two separate server IP1, IP2
2 - I start the java client, run and add object into distributed queue. The client is connected to IP1.
3 - The java client is killed.
4 - I restart the client, the client is connected to IP2, and move to the state started.

When trying to access to a distributed queue i get this exception while iterating over the element:

Caused by: java.lang.RuntimeException: com.hazelcast.nio.Data cannot be cast to com.hazelcast.impl.Keys
at com.hazelcast.impl.ClientServiceException.readData(ClientServiceException.java:63)
at com.hazelcast.nio.Serializer$DataSerializer.read(Serializer.java:104)
at com.hazelcast.nio.Serializer$DataSerializer.read(Serializer.java:79)
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:119)
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:148)
at com.hazelcast.client.ClientThreadContext.toObject(ClientThreadContext.java:72)
at com.hazelcast.client.IOUtil.toObject(IOUtil.java:34)
at com.hazelcast.client.ProxyHelper.getValue(ProxyHelper.java:186)
at com.hazelcast.client.ProxyHelper.doOp(ProxyHelper.java:146)
at com.hazelcast.client.ProxyHelper.doOp(ProxyHelper.java:140)
at com.hazelcast.client.QueueClientProxy.iterator(QueueClientProxy.java:174)

This does not happens if the client connects to the server IP1 whom the client was connected before.

I don't know how to manage this case which is unexpected (Hazelcast servers has no master instance), unless we manage a master instance of hazelcast server.

I'm running the 2.2 Community Edition

Thanks,

François

@mdogan mdogan closed this in 0d79b0c Aug 13, 2012

@ghost ghost assigned mdogan Aug 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.