In our system, we have a Hazelcast cluster consisting of 2 nodes. Hazelcast is refusing the connection of the other member. What could be the reasons?
In the log file i see:
2017-10-13 17:39:25,419 [T:B_Hazelcast.IO.thread-Acceptor, C:] INFO c.h.n.tcp.SocketAcceptorThread | [10.15.162.50]:5701 [ESB_Hazelcast] [3.7.2] **Accepting socket connection** from /10.15.162.51:33497
2017-10-13 17:39:25,420 [T:_ESB_Hazelcast.cached.thread-5, C:] INFO c.h.n.t.TcpIpConnectionManager | [10.15.162.50]:5701 [ESB_Hazelcast] [3.7.2] **Established socket connection** between /10.15.162.50:5701 and /10.15.162.51:33497
2017-10-13 17:39:25,428 [T:ity-generic-operation.thread-0, C:] INFO c.h.c.i.p.t.AuthenticationMessageTask | [10.15.162.50]:5701 [ESB_Hazelcast] [3.7.2] Received auth from Connection[id=12, /10.15.162.50:5701->/10.15.162.51:33497, endpoint=null, alive=true, type=JAVA_CLIENT], **successfully authenticated**, principal : ClientPrincipal{uuid='39851f2a-cc6e-4bbb-be33-603352b2aaa6', ownerUuid='126694e3-daee-4999-8afc-870f1cd9da2e'}, owner connection : true
2017-10-13 17:39:25,512 [T:ity-generic-operation.thread-0, C:] WARN
c.h.c.i.o.ClientReAuthOperation | [10.15.162.50]:5701 [ESB_Hazelcast] [3.7.2] com.hazelcast.spi.exception.**CallerNotMemberException: Not Member!** this: [10.15.162.50]:5701, caller: [10.15.162.51]:5701, partitionId: -1, operation: com.hazelcast.client.impl.operations.ClientReAuthOperation, service: hz:core:clientEngine
The server is instantiated with
public static HazelcastInstance createServer(Environment env) {
com.hazelcast.config.Config hazelcastConfig = new com.hazelcast.config.Config();
final String clusterName = env.getProperty("core.hazelcast.clusterName");
hazelcastConfig.getGroupConfig().setName(clusterName);
hazelcastConfig.getGroupConfig().setPassword(env.getProperty("core.hazelcast.clusterPassword"));
JoinConfig joinConfig = hazelcastConfig.getNetworkConfig().getJoin();
joinConfig.getMulticastConfig().setEnabled(false);
joinConfig.getTcpIpConfig().setEnabled(true);
final String members = env.getProperty("core.hazelcast.members");
//Here it comes!!!
if (!StringUtils.isEmpty(members)) {
joinConfig.getTcpIpConfig().addMember(members);
}
hazelcastConfig.setProperty(GroupProperty.LOGGING_TYPE.getName(), "slf4j");
return new HazelcastLifecycleBean(Hazelcast.newHazelcastInstance(hazelcastConfig));
}
In the configuration file is
core.hazelcast.members=10.15.162.50,10.15.162.51
And this is passed to joinConfig.getTcpIpConfig().addMember
Any ideas?
Please specify the port as part of your tcp member addresses. Instead of core.hazelcast.members=10.15.162.50,10.15.162.51 use core.hazelcast.members=10.15.162.50:5701,10.15.162.51:5701
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.