Client problem connecting to a cluster with multicast configuration

394 views
Skip to first unread message

Paolo Di Tommaso

unread,
Mar 4, 2014, 1:21:03 PM3/4/14
to haze...@googlegroups.com
Dear all, 

I'm unable to manage to connect to an Hazelcast cluster, that uses a "multicast" network configuration, from a client application, in the same network, that using this code: 

HazelcastClient.newHazelcastClient( new ClientConfig() )


The exception raised is the following. Any idea what's wrong with it?  


Mar-04 12:09:05.748 [hz.client_0_nextflow.cluster-listener] DEBUG c.h.client.spi.ClientClusterService - IO error during initial connection...
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.7.0_51]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[na:1.7.0_51]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[na:1.7.0_51]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[na:1.7.0_51]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.7.0_51]
at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_51]
at com.hazelcast.client.connection.ConnectionImpl.<init>(ConnectionImpl.java:79) ~[hazelcast-all-3.1.6.jar:3.1.6]
at com.hazelcast.client.connection.SmartClientConnectionManager.newConnection(SmartClientConnectionManager.java:101) ~[hazelcast-all-3.1.6.jar:3.1.6]
at com.hazelcast.client.spi.impl.ClientClusterServiceImpl.connectToOne(ClientClusterServiceImpl.java:533) [hazelcast-all-3.1.6.jar:3.1.6]
at com.hazelcast.client.spi.impl.ClientClusterServiceImpl.access$900(ClientClusterServiceImpl.java:59) [hazelcast-all-3.1.6.jar:3.1.6]
at com.hazelcast.client.spi.impl.ClientClusterServiceImpl$ClusterListenerThread.pickConnection(ClientClusterServiceImpl.java:420) [hazelcast-all-3.1.6.jar:3.1.6]
at com.hazelcast.client.spi.impl.ClientClusterServiceImpl$ClusterListenerThread.run(ClientClusterServiceImpl.java:384) [hazelcast-all-3.1.6.jar:3.1.6]
Mar-04 12:09:05.751 [hz.client_0_nextflow.cluster-listener] DEBUG c.h.client.spi.ClientClusterService - IO error during initial connection...



Cheers,
Paolo

Peter Veentjer

unread,
Mar 4, 2014, 1:23:23 PM3/4/14
to haze...@googlegroups.com
It could be that multicast is not supported on your network or operating system.

Try to use regular tcpip discovery and see if that works.


--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/2a7abdec-3724-49a6-a6de-f6aa2f3e5db8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Peter Veentjer

unread,
Mar 4, 2014, 1:27:23 PM3/4/14
to haze...@googlegroups.com
Apparently I did not drink enough or too much coffee.

Clients don't have multicast.

The client will connect to localhost if nothing configured. If you Hazelcast cluster members are running on different machines, you need to give the ip address of at least one of them in the client config. It is better to have more than 1 ip address to make sure that the client is able to connect.

Paolo Di Tommaso

unread,
Mar 4, 2014, 1:31:33 PM3/4/14
to haze...@googlegroups.com

Hi Pete,

But if it works for the nodes, why should not work for the client app?

Best, p

You received this message because you are subscribed to a topic in the Google Groups "Hazelcast" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hazelcast/piL7mAv8mJ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hazelcast+...@googlegroups.com.

To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.

Peter Veentjer

unread,
Mar 4, 2014, 1:32:29 PM3/4/14
to haze...@googlegroups.com
The client doesn't support multicast. So it isn't able to find members in the cluster. I guess you are using multicast for member discovery, right?


Paolo Di Tommaso

unread,
Mar 4, 2014, 1:36:07 PM3/4/14
to haze...@googlegroups.com

Yes. I was supposing that I could use the multicast discovery also from the client.

Ok, if so I will try changing it.

Best, p

Reply all
Reply to author
Forward
0 new messages