Hazelcast is selecting IPv4 adresses.
It would appear that Hazelcast is also trying IPV4, from the following logging, but interestingly enough it is often returning 127.0.0.1 as a host, rather than the 192.168.56.51 it finds at other times, which certainly does confuse its determination of who is Master. All of the Hazelcast instances are running in the same VM, with the same cluster:
h1 = Hazelcast.newHazelcastInstance(config1);
h1.addInstanceListener(this);
HazelcastInstance h2 = Hazelcast.newHazelcastInstance(config1);
INFO: Interfaces is disabled, trying to pick one address from TCP-IP config addresses: [192.168.56.51]
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.AddressPicker
INFO: Prefer IPv4 stack is true.
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.AddressPicker
INFO: Picked Address[192.168.56.51]:5704, using socket ServerSocket[addr=/
0.0.0.0,localport=5704], bind any local is true
Aug 31, 2012 11:30:46 AM com.hazelcast.system
INFO: [192.168.56.51]:5704 [devEnv] Hazelcast Community Edition 2.2 (20120723) starting at Address[192.168.56.51]:5704
Aug 31, 2012 11:30:46 AM com.hazelcast.system
INFO: [192.168.56.51]:5704 [devEnv] Copyright (C) 2008-2012 Hazelcast.com
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.PartitionManager
INFO: [192.168.56.51]:5703 [dev] Initializing cluster partition table first arrangement...
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.LifecycleServiceImpl
INFO: [192.168.56.51]:5704 [devEnv] Address[192.168.56.51]:5704 is STARTING
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.TcpIpJoiner
INFO: [192.168.56.51]:5704 [devEnv] Connecting to possible member: Address[192.168.56.51]:5701
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.TcpIpJoiner
INFO: [192.168.56.51]:5704 [devEnv] Connecting to possible member: Address[192.168.56.51]:5702
Aug 31, 2012 11:30:46 AM com.hazelcast.impl.TcpIpJoiner
INFO: [192.168.56.51]:5704 [devEnv] Connecting to possible member: Address[192.168.56.51]:5703
Aug 31, 2012 11:30:46 AM com.hazelcast.nio.SocketAcceptor
INFO: [192.168.56.51]:5703 [dev] 5703 is accepting socket connection from /
192.168.56.51:44074Aug 31, 2012 11:30:46 AM com.hazelcast.nio.ConnectionManager
INFO: [192.168.56.51]:5703 [dev] 5703 accepted socket connection from /
192.168.56.51:44074Aug 31, 2012 11:30:46 AM com.hazelcast.nio.ConnectionManager
INFO: [192.168.56.51]:5704 [devEnv] 44074 accepted socket connection from /
192.168.56.51:5703Aug 31, 2012 11:30:46 AM com.hazelcast.nio.ConnectionManager
INFO: [192.168.56.51]:5704 [devEnv] 44367 accepted socket connection from /
192.168.56.51:5701Aug 31, 2012 11:30:46 AM com.hazelcast.nio.ConnectionManager
INFO: [192.168.56.51]:5704 [devEnv] 34324 accepted socket connection from /
192.168.56.51:5702Aug 31, 2012 11:30:47 AM com.hazelcast.impl.Node
INFO: [192.168.56.51]:5704 [devEnv] ** setting master address to Address[127.0.0.1]:5701
Aug 31, 2012 11:30:47 AM com.hazelcast.nio.ConnectionManager
INFO: [192.168.56.51]:5704 [devEnv] 60314 accepted socket connection from /
127.0.0.1:5701Aug 31, 2012 11:30:47 AM com.hazelcast.impl.Node
INFO: [192.168.56.51]:5704 [devEnv] ** setting master address to Address[192.168.56.51]:5703
Aug 31, 2012 11:30:47 AM com.hazelcast.cluster.ClusterManager
INFO: [192.168.56.51]:5704 [devEnv]
Members [3] {
Member [127.0.0.1]:5701
Member [127.0.0.1]:5702
Member [192.168.56.51]:5704 this
}
Aug 31, 2012 11:30:48 AM com.hazelcast.nio.ConnectionManager
INFO: [192.168.56.51]:5704 [devEnv] 49400 accepted socket connection from /
127.0.0.1:5702Aug 31, 2012 11:30:48 AM com.hazelcast.impl.PartitionManager
WARNING: [192.168.56.51]:5704 [devEnv] Received a PartitionRuntimeState, but its sender doesn't seem master! => Sender: Address[192.168.56.51]:5701, Master: Address[192.168.56.51]:5703! (Ignore if master node has changed recently.)
Aug 31, 2012 11:30:49 AM com.hazelcast.impl.PartitionManager
WARNING: [192.168.56.51]:5704 [devEnv] Received a PartitionRuntimeState, but its sender doesn't seem master! => Sender: Address[192.168.56.51]:5701, Master: Address[192.168.56.51]:5703! (Ignore if master node has changed recently.)
Aug 31, 2012 11:30:50 AM com.hazelcast.impl.PartitionManager