Provide a parameter which IP the Hazelcast cluster will start with in the environment where multiple IPs assigned to same interface

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Data Center - Core
    • None
    • 0
    • 2

      When a server has multiple IPs assigned to the same interface, these interfaces are listed below on the OS level:
      Some data is replaced to mask the customer data.

      [linux(root):/tmp] ifconfig
      ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 10.0.0.6 netmask 255.255.240.0 broadcast 10.0.0.255
      inet6 ab12::123:12ab:abba:baa1 prefixlen 64 scopeid 0x20<link>
      ether 00:11:22:33:44:a3 txqueuelen 1000 (Ethernet)
      
      ens192:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 10.0.0.7 netmask 255.255.240.0 broadcast 10.0.0.255
      ether 00:11:22:33:44:a3 txqueuelen 1000 (Ethernet)
      
      ens192:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 10.0.0.8 netmask 255.255.240.0 broadcast 10.0.0.255
      ether 00:11:22:33:44:a3 txqueuelen 1000 (Ethernet)
      
      ens192:3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 10.0.0.9 netmask 255.255.240.0 broadcast 10.0.0.255
      ether 00:11:22:33:44:a3 txqueuelen 1000 (Ethernet)
      

      But at the Java level, all these IPs are listed under the ens192 interface:

      [linux(root):/tmp] java -var ListInterfaces-v2.jar
      interfaces.size() = 2
      
      networkInterface[0]
      name:ens192 (ens192)
      addresses:10.0.0.6
      addresses:10.0.0.7
      addresses:10.0.0.8
      addresses:10.0.0.9
      
      networkInterface[1]
      name:lo (lo)
      addresses:0:0:0:0:0:0:0:1%lo
      addresses:127.0.0.1
      

      So when ens192 is defined in the confluence.cluster.interface, Java chooses one of the IPs listed there and Confluence joins the cluster with this IP. Even this randomly chosen IP does not match with the IP defined in the confluence.cluster.peers, Confluence can successfully create/join the cluster.

      2022-06-XX AA:BB:33,036 INFO [Catalina-utility-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 7.13.2 [build 8703 based on commit hash 18610ca9bb728e0bf306db7f91bba5eaed12b190] - synchrony version 4.0.0-master-f680ea21
      2022-06-XX AA:BB:37,231 INFO [Catalina-utility-1] [confluence.cluster.hazelcast.HazelcastClusterManager] configure Configuring Hazelcast with instanceName [confluence], join configuration TCP/IP member addresses: 10.0.0.6|10.0.1.6, network interfaces [10.0.0.6, 10.0.0.7, 10.0.0.8, 10.0.0.9] and local port 5801
      2022-06-XX AA:BB:37,232 INFO [Catalina-utility-1] [confluence.cluster.hazelcast.HazelcastClusterManager] startCluster Starting the cluster.
      2022-06-XX AA:BB:38,577 INFO [hz.confluence.event-1] [confluence.cluster.hazelcast.LoggingClusterMembershipListener] memberAdded [10.0.0.7]:5801 joined the cluster
      2022-06-XX AA:BB:38,583 INFO [hz.confluence.event-1] [confluence.cluster.hazelcast.LoggingClusterMembershipListener] logClusterMembers Cluster now has 1 members: [[10.0.0.7]:5801]
      2022-06-XX AA:BB:45,682 INFO [hz.confluence.event-1] [confluence.cluster.hazelcast.LoggingClusterMembershipListener] memberAdded [10.0.1.6]:5801 joined the cluster
      2022-06-XX AA:BB:45,683 INFO [hz.confluence.event-1] [confluence.cluster.hazelcast.LoggingClusterMembershipListener] logClusterMembers Cluster now has 2 members: [[10.0.1.6]:5801, [10.0.0.7]:5801]
      2022-06-XX AA:BB:46,637 INFO [Catalina-utility-1] [confluence.cluster.hazelcast.HazelcastClusterManager] startCluster Confluence cluster node identifier is [123a12ab]
      2022-06-XX AA:BB:46,638 INFO [Catalina-utility-1] [confluence.cluster.hazelcast.HazelcastClusterManager] startCluster Confluence cluster node name is [node-1]
      2022-06-XX AA:BC:02,995 INFO [Catalina-utility-1] [cluster.hazelcast.monitoring.HazelcastMembershipListener] init init: cluster ClusterService{address=[10.0.0.7]:5801}
      2022-06-XX AA:BC:02,995 INFO [Catalina-utility-1] [cluster.hazelcast.monitoring.HazelcastMembershipListener] init init: cluster contains Member [10.0.1.6]:5801 - c1856a90-208c-43ad-8531-8a55ac0ae727
      2022-06-XX AA:BC:02,996 INFO [Catalina-utility-1] [cluster.hazelcast.monitoring.HazelcastMembershipListener] init init: cluster contains Member [10.0.0.7]:5801 - 65246436-3111-434f-8112-ab0463adafae this
      

      Please provide an additional parameter for nodes to force Java to choose provided IP. This will clear the randomness which makes the environment error-prone.

            Assignee:
            Unassigned
            Reporter:
            Basar Beykoz (Inactive)
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: