Hi am trying to configure hazelcast cluster over AWS.
I am running hazelcast in docker container and using --net=host to use host network config.
when i look at hazelcast logs, I see
[172.17.0.1]:5701 [herald] [3.8] Established socket connection between /[node2]:5701 and /[node1]:47357 04:24:22.595 [hz._hzInstance_1_herald.IO.thread-out-0] DEBUG c.h.n.t.SocketWriterInitializerImpl - [172.17.0.1]:5701 [herald] [3.8] Initializing SocketWriter WriteHandler with Cluster Protocol 04:24:22.595 [hz._hzInstance_1_herald.IO.thread-in-0] WARN c.h.nio.tcp.TcpIpConnectionManager - [172.17.0.1]:5701 [herald] [3.8] Wrong bind request from [172.17.0.1]:5701! This node is not requested endpoint: [node2]:5701 04:24:22.595 [hz._hzInstance_1_herald.IO.thread-in-0] INFO c.hazelcast.nio.tcp.TcpIpConnection - [172.17.0.1]:5701 [herald] [3.8] Connection[id=40, /[node2]:5701->/[node1]:47357, endpoint=null, alive=false, type=MEMBER] closed. Reason: Wrong bind request from [172.17.0.1]:5701! This node is not requested endpoint: [node2]:5701
I can see error saying bind request is coming from 172.17.0.1 to node1, and node1 is not accepting this request.
final Config config = new Config(); config.setGroupConfig(clientConfig().getGroupConfig()); final NetworkConfig networkConfig = new NetworkConfig(); final JoinConfig joinConfig = new JoinConfig(); final TcpIpConfig tcpIpConfig = new TcpIpConfig(); final MulticastConfig multicastConfig = new MulticastConfig(); multicastConfig.setEnabled(false); final AwsConfig awsConfig = new AwsConfig(); awsConfig.setEnabled(true); // awsConfig.setSecurityGroupName("xxxx"); awsConfig.setRegion("xxxx"); awsConfig.setIamRole("xxxx"); awsConfig.setTagKey("type"); awsConfig.setTagValue("xxxx"); awsConfig.setConnectionTimeoutSeconds(120); joinConfig.setAwsConfig(awsConfig); joinConfig.setMulticastConfig(multicastConfig); joinConfig.setTcpIpConfig(tcpIpConfig); networkConfig.setJoin(joinConfig); final InterfacesConfig interfaceConfig = networkConfig.getInterfaces(); interfaceConfig.setEnabled(true).addInterface("172.29.238.71"); config.setNetworkConfig(networkConfig);
above is the code to configure AWSConfig Please help me resolve this issue.
Thanks