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

NamingContext does not take potential AutoDiscoveryAddress XML property overrides when sending discovery requests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • No Release
    • JBossAS-4.0.5.GA, JBossAS-5.0.0.Beta2, JBossAS-4.2.1.GA
    • Clustering, Naming
    • None
    • Low
    • Hide

      There're 3 possible workarounds:

      1.- remove XML override from AutoDiscoveryAddress, i.e:
      <attribute name="AutoDiscoveryAddress">230.0.0.4</attribute>

      2.- use a different XML override name so that jboss.partition.udpGroup confusion is avoided, but
      without setting this property on startup! :
      <attribute name="AutoDiscoveryAddress">${jboss.partition.autoDiscoveryGroup:230.0.0.4}</attribute>

      3.- set AutoDiscoveryGroup via jnp.discoveryGroup system property, see:
      http://wiki.jboss.org/wiki/Wiki.jsp?page=NamingContextFactory

      Show
      There're 3 possible workarounds: 1.- remove XML override from AutoDiscoveryAddress, i.e: <attribute name="AutoDiscoveryAddress">230.0.0.4</attribute> 2.- use a different XML override name so that jboss.partition.udpGroup confusion is avoided, but without setting this property on startup! : <attribute name="AutoDiscoveryAddress">${jboss.partition.autoDiscoveryGroup:230.0.0.4}</attribute> 3.- set AutoDiscoveryGroup via jnp.discoveryGroup system property, see: http://wiki.jboss.org/wiki/Wiki.jsp?page=NamingContextFactory

      Bug in org.jnp.interfaces.NamingContext:

      discoverServer(Hashtable) method

      String group = DEFAULT_DISCOVERY_GROUP_ADDRESS;
      ...
      String discoveryGroup = (String) serverEnv.get(JNP_DISCOVERY_GROUP);
      if (discoveryGroup != null)
      group = discoveryGroup;
      ...
      iaGroup = InetAddress.getByName(group);
      ....
      if (trace)
      log.trace("Sending discovery packet(" + data + ") to: " + iaGroup + ":" + port);

      NamingContext code does not take in account possible system property overrides
      coming from:

      <attribute name="AutoDiscoveryAddress">${jboss.partition.udpGroup:230.0.0.4}</attribute>

      AutoDiscoveryAddress used to send discovery messages is controlled via the the
      default value, 230.0.0.4 or jnp.discoveryGroup property.

      So, if user sets jboss.partition.udpGroup=224.0.0.1 on startup,
      DetachedHANamingService$AutomaticDiscovery will listen on 224.0.0.1 while
      NamingContext sends discovery requests to 230.0.0.4

              bstansbe@redhat.com Brian Stansberry
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: