Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5581

Setting jgroups.bind_address or bind.address in run.conf will be ignored if -b used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • No Release
    • JBossAS-4.2.2.GA, JBossAS-5.0.0.Beta4
    • None
    • None
    • Low
    • Workaround Exists
    • Hide

      Good workaround: Use -Djgroups.bind_addr instead of the long ago deprecated -Dbind.address
      Less good workaround: Pass -Dbind.address in the command line rather than in run.conf

      Show
      Good workaround: Use -Djgroups.bind_addr instead of the long ago deprecated -Dbind.address Less good workaround: Pass -Dbind.address in the command line rather than in run.conf

      • Why it it useless specifying -Dbind.address=192.168.0.1 inside run.conf?
        Why does it work only specifying it on command line?

      For example:
      If you set -Dbind.address=127.0.0.1 in run.conf and starting AS with:
      ./bin/run.sh -b 10.33.144.245

      The value assigned to -Dbind.address will be ignored.

      When you pass -Dbind.address in the command line, JBoss sets
      both this system property and -Djgroups.bind_address to that value, which
      means that if you pass -b after that, it won't override the given
      -Dbind.address. Bottom line, if -Dbind.address set in command line before
      -b, it's the winner. Example:

      ./bin/run.sh -Dbind.address=127.0.0.1 -b 1.2.3.4
      -> JGroups will bind to 127.0.0.1

      If you pass -b in the command line before -Dbind.address, -b will first
      set -Dbind.address and -Djgroups.bind_address, but then, when
      -Dbind.address is process, it will override the values of them two with
      what was passed in -Dbind.address

      ./bin/run.sh -b 1.2.3.4 -Dbind.address=127.0.0.1
      -> JGroups will bind to 127.0.0.1

      Now, This does not happen when the -Dbind.address is set in run.conf
      instead of command line. There's a bug here. When AS processes -b,
      it checks whether -Dbind.address has been set, which it has, so leaves
      it as it is. Now, when it checks -Djgroups.bind_address, it sees that it hasn't
      been set, but does not do a double check in case -Dbind.address has been set,
      so it ends up setting -Djgroups.bind_address to the value of -b, that way ignoring
      the value you passed to -Dbind.address. Example:

      run.conf with -Dbind.address=127.0.0.1
      ./bin/run.sh -b 1.2.3.4
      -> JGroups will bind to 1.2.3.4

      What's the fix? Add the double check in -b processing so that if -Dbind.address was
      set by the user, AS does not take the value of -b and assign to -Djgroups.bind_addr

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: