2 Replies Latest reply on Sep 6, 2010 5:30 AM by kasimier42

    JGroups does not support bind to 0.0.0.0 ??

    kasimier42

      Hi you cluster gurus,

       

      I'm quite new to clusters and JBoss and try to build a cluster with JBoss AS 5.1.0.GA which is bound to 0.0.0.0 to be reachable on all NICs

      I also have the PostOffice clustered with standard JGroup stacks from jgroups-channelfactory.sar (jbm-data, jbm-control).

       

      But when I bind JBoss and JGroups to 0.0.0.0 and run two instances, they discard messages from each other, message in server.log is

       

      NAKACK] 0.0.0.0:57981] discarded message from non-member 0.0.0.0:57375, my view is [0.0.0.0:57981|0] [0.0.0.0:57981]

       

      which constantly repeats on both instances. instances are two independent physical machines which know the hostnames and IPs of the others.

       

      Whats going wrong here? Why does JGroups use 0.0.0.0 do connect to other cluster members, its just the address JBoss and JGroups have to be bound to, a particular client connection only can be done from a specific IP, not from 0.0.0.0

       

      Is it really a bug in JGroups or do I have to configure something else ??

       

      thanx for your help :-)

        • 1. Re: JGroups does not support bind to 0.0.0.0 ??
          jms_j

          How did you startup each node in the cluster ? That is, what command-line parameters did you specify ? Did you include the hostname parameter ( e.g. -b or --host with run.bat or run.sh ) ?:

           

          options:
              -h, --help                    Show this help message
              -V, --version                 Show version information
              --                            Stop processing options
              -D<name>[=<value>]            Set a system property
              -d, --bootdir=<dir>           Set the boot patch directory; Must be absolute or url
              -p, --patchdir=<dir>          Set the patch directory; Must be absolute or url
              -n, --netboot=<url>           Boot from net with the given url as base
              -c, --configuration=<name>    Set the server configuration name
              -B, --bootlib=<filename>      Add an extra library to the front bootclasspath
              -L, --library=<filename>      Add an extra library to the loaders classpath
              -C, --classpath=<url>         Add an extra url to the loaders classpath
              -P, --properties=<url>        Load system properties from the given url
              -b, --host=<host or ip>       Bind address for all JBoss services
              -g, --partition=<name>        HA Partition name (default=DefaultDomain)
              -m, --mcast_port=<ip>         UDP multicast port; only used by JGroups
              -u, --udp=<ip>                UDP multicast address
              -l, --log=<log4j|jdk>         Specify the logger plugin type

          • 2. Re: JGroups does not support bind to 0.0.0.0 ??
            kasimier42

            I start JBoss with several system properties

             

            -Djboss.bind.address=0.0.0.0 \
            -Djboss.server.name=all \
            -Djboss.partition.name=MyPartition \
            -Djgroups.bind.address=0.0.0.0 \
            -Dbind.address=0.0.0.0  \
            -Djboss.messaging.ServerPeerID=1 \
            -Djboss.partition.udpGroup=228.0.0.8 \
            -Djboss.messaging.groupname=MessagingPostOffice

             

             

            where jboss.bind.address replaces -b option

            jboss.server.name replaces -c option

            jboss.partition.name replaces -g option

            jboss.partition.udpGroup replaces -u option

             

            with these settings everything works fine wehn I bind to a specific IP, only when I bind to 0.0.0.0 the logs on both machines say

             

            NAKACK] 0.0.0.0:57981] discarded message from non-member 0.0.0.0:57375, my view is [0.0.0.0:57981|0] [0.0.0.0:57981]