28.6. Other Configuration Issues
28.6.1. Binding JGroups Channels to a Particular Interface
bind_addrelement in an XML configuration file will be ignored by JGroups if it finds that the system property
jgroups.bind_addr(or a deprecated earlier name for the same thing,
bind.address) has been set. The system property has a higher priority level than the XML property. If JBoss Enterprise Application Platform is started with the
--host) switch, the application server will set
jgroups.bind_addrto the specified value. If
-bis not set, the application server will bind most services to
- Binding JGroups to the same interface as other services. Simple, just use
./run.sh -b 192.168.1.100 -c production
- Binding services (e.g., JBoss Web) to one interface, but use a different one for JGroups:
./run.sh -b 10.0.0.100 -Djgroups.bind_addr=192.168.1.100 -c productionSpecifically setting the system property overrides the
-bvalue. This is a common usage pattern; put client traffic on one network, with intra-cluster traffic on another.
- Binding services (e.g., JBoss Web) to all interfaces. This can be done like this:
./run.sh -b 0.0.0.0 -c productionHowever, doing this will not cause JGroups to bind to all interfaces! Instead, JGroups will bind to the machine's default interface. See the Transport Protocols section for how to tell JGroups to receive or send on all interfaces, if that is what you really want.
- Binding services (e.g., JBoss Web) to all interfaces, but specify the JGroups interface:
./run.sh -b 0.0.0.0 -Djgroups.bind_addr=192.168.1.100 -c productionAgain, specifically setting the system property overrides the
- Using different interfaces for different channels:
./run.sh -b 10.0.0.100 -Djgroups.ignore.bind_addr=true -c production
jgroups.bind_addrsystem property, and instead use whatever is specified in XML. You would need to edit the various XML configuration files to set the various
bind_addrattributes to the desired interfaces.