Este contenido no está disponible en el idioma seleccionado.

28.6. Other Configuration Issues


28.6.1. Binding JGroups Channels to a Particular Interface

In the Transport Protocols section above, we briefly touched on how the interface to which JGroups will bind sockets is configured. Let us get into this topic in more depth:
First, it is important to understand that the value set in any bind_addr element 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 -b (or --host) switch, the application server will set jgroups.bind_addr to the specified value. If -b is not set, the application server will bind most services to localhost by default.
So, what are best practices for managing how JGroups binds to interfaces?
  • Binding JGroups to the same interface as other services. Simple, just use -b:
    ./run.sh -b 192.168.1.100 -c production
    Copy to Clipboard Toggle word wrap
  • 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 production
    Copy to Clipboard Toggle word wrap
    Specifically setting the system property overrides the -b value. 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 production
    Copy to Clipboard Toggle word wrap
    However, 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 production
    Copy to Clipboard Toggle word wrap
    Again, specifically setting the system property overrides the -b value.
  • Using different interfaces for different channels:
    ./run.sh -b 10.0.0.100 -Djgroups.ignore.bind_addr=true -c production
    Copy to Clipboard Toggle word wrap
This setting tells JGroups to ignore the jgroups.bind_addr system property, and instead use whatever is specified in XML. You would need to edit the various XML configuration files to set the various bind_addr attributes to the desired interfaces.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat