Search code examples
jbossinfinispanjgroups

Infinispan server ignores jgroups bind_addr


I'm trying to get to work simple Infinispan Server cluster containing two nodes. The problem is that Infinispan ignores my bind_addr jgroups setting in clustered.xml file. I can specify this setting using -Djgroups.bind_addr=GLOBAL -- it works, but it isn't handy. I start cluster using bin/clustered.sh script, use TCP protocol stack and MPING for nodes autodiscovery.

The part of configuration file standalone/configuration/clustered.xml related to jgroups:

<subsystem xmlns="urn:jboss:domain:jgroups:1.2" default-stack="${jboss.default.jgroups.stack:tcp}">
    <stack name="udp">
        <transport type="UDP" socket-binding="jgroups-udp"/>
        <protocol type="PING"/>
        <protocol type="MERGE2"/>
        <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
        <protocol type="FD_ALL"/>
        <protocol type="pbcast.NAKACK"/>
        <protocol type="UNICAST2"/>
        <protocol type="pbcast.STABLE"/>
        <protocol type="pbcast.GMS"/>
        <protocol type="UFC"/>
        <protocol type="MFC"/>
        <protocol type="FRAG2"/>
        <protocol type="RSVP"/>
    </stack>
    <stack name="tcp">
        <transport type="TCP" socket-binding="jgroups-tcp"/>
        <protocol type="MPING" socket-binding="jgroups-mping">
            <property name="bind_addr">GLOBAL</property>
        </protocol> 
        <protocol type="MERGE2"/>
        <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
        <protocol type="FD"/>
        <protocol type="VERIFY_SUSPECT"/>
        <protocol type="pbcast.NAKACK">
            <property name="use_mcast_xmit">false</property>
        </protocol>
        <protocol type="UNICAST2"/>
        <protocol type="pbcast.STABLE"/>
        <protocol type="pbcast.GMS"/>
        <protocol type="UFC"/>
        <protocol type="MFC"/>
        <protocol type="FRAG2"/>
        <protocol type="RSVP"/>
    </stack>
</subsystem>

I also tried -Djgroups.ignore.bind_addr=true option to prevent Infinispan deriving bind_addr setting from system properties instead of XML, whoever might set it -- it didn't help.

Infinispan version 6.0.

Update: socket-binding-group and interfaces elements:

    <interfaces>
        <interface name="management">
            <!-- <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> -->
            <any-address/>
        </interface>
        <interface name="public">
            <!-- <inet-address value="${jboss.bind.address:127.0.0.1}"/> -->
            <any-address/>
        </interface>
    </interfaces>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
        <socket-binding name="ajp" port="8009"/>
        <socket-binding name="hotrod" port="11222"/>
        <socket-binding name="http" port="8080"/>
        <socket-binding name="https" port="8443"/>
        <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45700"/>
        <socket-binding name="jgroups-tcp" port="7600"/>
        <socket-binding name="jgroups-tcp-fd" port="57600"/>
        <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45688"/>
        <socket-binding name="jgroups-udp-fd" port="54200"/>
        <socket-binding name="memcached" port="11211"/>
        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.115" multicast-port="23364"/>
        <socket-binding name="remoting" port="4447"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <socket-binding name="websocket" port="8181"/>
    </socket-binding-group>
</server>

Any help would be greatly appreciated!


Solution

  • I have completely removed socket-binding attributes from JGroups settings and left only bind_addr properties - and now it works. I'm very curious what is the difference between them.