6 Replies Latest reply on Jun 14, 2017 11:51 AM by carlosra85

    WildFly 10 Jgroups allways binding to localhost interface

    isurul

      Hi I'm trying to develop a clustered application that uses Infinispan for caching. First I tried to run in replicated mode by starting two instance of wildfly using the localhost as binding interface (with port offsets). This worked fine. But once I start the server using interface IP, cluster is not forming. Still I can access other services using the interface IP. I tried to telnet the Jgroups port using interface IP address and it failed. But telnetting to localhost works for Jgorups port.

      (Then entered localhsot[port] IP's to initial host configuration element in tcpping. Then cluster formation worked.)

      So my question is why does it bind to localhost even after starting wildfly using interface IP.

      Here is my configuration. (I cant use UDP, therefore need to use tcpping for cluster formation)

      Started the wilfly server using

      standalone.bat -Djboss.server.base.dir=../standalone_isuru -c standalone-full-ha.xml -b 192.168.17.33 -Djboss.node.name=isuru -Djboss.socket.binding.port-offset=1 

      Jgourps configuration

      <subsystem xmlns="urn:jboss:domain:jgroups:4.0"> 
        <channels default="ee"> 
        <channel name="ee" stack="tcpping"/> 
        </channels> 
      <stacks> 
        <stack name="udp">
        . . 
        </stack> 
        <stack name="tcp">
        . . 
        </stack> <stack name="tcpping"> 
        <transport type="TCP" socket-binding="jgroups-tcp"/> 
        <protocol type="TCPPING"> 
        <property name="initial_hosts"> 192.168.17.33[7601], 192.168.14.39[7700], 192.168.17.33[7800]</property> 
        <property name="num_initial_members"> 2 </property> 
        <property name="port_range"> 5 </property> 
        <property name="timeout"> 1000 </property> 
        </protocol> 
        <protocol type="MERGE3"/> 
        <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> 
        <protocol type="FD"/> 
        <protocol type="VERIFY_SUSPECT"/> 
        <protocol type="pbcast.NAKACK2"/> 
        <protocol type="UNICAST3"/> 
        <protocol type="pbcast.STABLE"/> 
        <protocol type="pbcast.GMS"/> 
        <protocol type="MFC"/> 
        <protocol type="FRAG2"/> 
        </stack> 
      </stacks> 
      

       

      Infinispan cache config

      <cache-container name="replicated_cache" default-cache="default" module="org.wildfly.clustering.server" jndi-name="infinispan/replicated_cache"> 
      <transport lock-timeout="60000"/> 
        <replicated-cache name="customer" jndi-name="infinispan/replicated_cache/customer" mode="SYNC"> 
        <transaction locking="OPTIMISTIC" mode="FULL_XA"/> 
        <eviction strategy="NONE"/> 
        </replicated-cache> 
      </cache-container>