2

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!

ars
  • 1,509
  • 3
  • 18
  • 29

3 Answers3

1

I think you have to define the interface in a <socket-binding-group> or <interfaces> element, so either in jgroups-udp or jgroups-tcp. Those are defined at the end of the config and you can try to see if JGroups variable substitution works, e.g. "${my.interface:GLOBAL}".

Bela Ban
  • 2,186
  • 13
  • 12
  • I'd just tried it and it didn't help; I suppose this is useless, because the default interface in is "public", which already has value (it is analogue of GLOBAL, as I understand). I have updated the post with these settings. Also, what is the relationship between the interface specified in socket-binding-group and the interface specified in [bind_addr](http://www.jgroups.org/manual/html/protlist.html#Transport) property of TCP or UDP element in jgroups settings? – ars Oct 01 '14 at 12:48
1

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.

ars
  • 1,509
  • 3
  • 18
  • 29
0

I had the same issue and found out the solution in JGroups documentation, https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch19s07s07.html

Running with -Djgroups.ignore.bind_addr=true will force it to overwrite the system property 'bind_addr' and use the XML bind_addr instead.

Document says,

"This setting tells JGroups to ignore the jgroups.bind_addr system property, and instead use whatever is specfied in XML"

SajithP
  • 592
  • 8
  • 19