Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_ms04
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,666

      Description

      Tracking issue

      Describe how GlassFish 3.1 clustering is expected to work when DAS and remote
      instances are running on multi-home machines. Implement the behavior.

        Issue Links

          Activity

          Hide
          Tom Mueller added a comment -

          Proposal:

          The expected behavior is that for each TCP or UDP service, the service can be configured
          to listen on either 0.0.0.0 (the default), or a specific IP address/hostname, where the
          address may be localhost (127.0.0.1). A "TCP or UDP service" include all listeners,
          anything that listens on a port, etc.

          Exceptions to the 0.0.0.0 default are:
          the OSGi console that listens on port 6666 - default 127.0.0.1
          admin-listener - possibly default to 127.0.0.1 (See issue 11626)

          Whenever the DAS, an instance, or asadmin is a client of a service, it determines the
          address of the service by consulting the appropriate configuration information. If that
          address is 0.0.0.0, then the hostname for the service is determined by looking at the
          <node> entry for the server that hosts the service.

          The configuration of an address for a specific service is provided by using the "address"
          attribute of the element that defines the listener for the service. For example:

          <network-listener address="somehost" port="8080" protocol="http-listener-1"
          transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />

          This proposal does not yet address the request in issue 4362, which is to ease deployment
          on a multi-homed system. Also need to confirm that every service uses the "address"
          attribute to specify an address.

          Show
          Tom Mueller added a comment - Proposal: The expected behavior is that for each TCP or UDP service, the service can be configured to listen on either 0.0.0.0 (the default), or a specific IP address/hostname, where the address may be localhost (127.0.0.1). A "TCP or UDP service" include all listeners, anything that listens on a port, etc. Exceptions to the 0.0.0.0 default are: the OSGi console that listens on port 6666 - default 127.0.0.1 admin-listener - possibly default to 127.0.0.1 (See issue 11626) Whenever the DAS, an instance, or asadmin is a client of a service, it determines the address of the service by consulting the appropriate configuration information. If that address is 0.0.0.0, then the hostname for the service is determined by looking at the <node> entry for the server that hosts the service. The configuration of an address for a specific service is provided by using the "address" attribute of the element that defines the listener for the service. For example: <network-listener address="somehost" port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" /> This proposal does not yet address the request in issue 4362, which is to ease deployment on a multi-homed system. Also need to confirm that every service uses the "address" attribute to specify an address.
          Hide
          Tom Mueller added a comment -

          Other ways to get a hostname:

          System.getProperty("com.sun.aas.hostName")

          InetAddress.getLocalHost().getHostName()

          Show
          Tom Mueller added a comment - Other ways to get a hostname: System.getProperty("com.sun.aas.hostName") InetAddress.getLocalHost().getHostName()
          Hide
          kumara added a comment -

          Another network address to consider is JMX RMI connector, typically on port 8686.

          Show
          kumara added a comment - Another network address to consider is JMX RMI connector, typically on port 8686.
          Hide
          Nazrul added a comment -

          It would be good to support comma separated list of IPs for address field when
          user wants to listen to more than one network address for a port.

          For example,
          <network-listener address="IP1, IP2" port="8080" ... />

          A customer wanted to use such feature. Our current implementation in web tier
          does not support this yet.

          Show
          Nazrul added a comment - It would be good to support comma separated list of IPs for address field when user wants to listen to more than one network address for a port. For example, <network-listener address="IP1, IP2" port="8080" ... /> A customer wanted to use such feature. Our current implementation in web tier does not support this yet.
          Hide
          Tom Mueller added a comment -

          See these bugs that need to be fixed:

          http://monaco.sfbay.sun.com/list.jsf?cr=6947624,6928886

          Show
          Tom Mueller added a comment - See these bugs that need to be fixed: http://monaco.sfbay.sun.com/list.jsf?cr=6947624,6928886
          Hide
          Tom Mueller added a comment -

          One snag in the current behavior is that when replicating commands and for
          commands such as list-instances that invoke commands on instances, the
          Server.getHost method is used to get the host name to use in running the
          command. Server.getHost returns the node's nodehost property. This means that
          if you have an instance configured to use only one address on a multi-address
          server, the node's nodehost property for that instance must be the same as the
          address configured for the admin-listener for the instance.

          See a discussion on admin@dev.java.net about this, subject "multi-address hosts
          and instances" started 8/9/10. One option would be to modify Server.getHost so
          that it returns the admin-listener address if it is not 0.0.0.0.

          Show
          Tom Mueller added a comment - One snag in the current behavior is that when replicating commands and for commands such as list-instances that invoke commands on instances, the Server.getHost method is used to get the host name to use in running the command. Server.getHost returns the node's nodehost property. This means that if you have an instance configured to use only one address on a multi-address server, the node's nodehost property for that instance must be the same as the address configured for the admin-listener for the instance. See a discussion on admin@dev.java.net about this, subject "multi-address hosts and instances" started 8/9/10. One option would be to modify Server.getHost so that it returns the admin-listener address if it is not 0.0.0.0.
          Hide
          Tom Mueller added a comment -

          Here are the two primary use cases I'm considering:

          1. Multiple distinct installations and/or domains of GlassFish are being
          operated on a server, with the intent to have one domain use one network and
          another use another network. For a particular DAS or instance, all of the ports
          for that instance are bound to the same host name.

          2. A server with multiple networks, e.g., a front-end network for web requests,
          a back-end administrative network, and a back-end database network. The HTTP/S
          listeners are bound to the front-end network, while the admin-listener, GMS
          traffic, etc. is bound to the administrative network. Presumably in this case,
          the nodes would be defined to use the administrative network.

          Show
          Tom Mueller added a comment - Here are the two primary use cases I'm considering: 1. Multiple distinct installations and/or domains of GlassFish are being operated on a server, with the intent to have one domain use one network and another use another network. For a particular DAS or instance, all of the ports for that instance are bound to the same host name. 2. A server with multiple networks, e.g., a front-end network for web requests, a back-end administrative network, and a back-end database network. The HTTP/S listeners are bound to the front-end network, while the admin-listener, GMS traffic, etc. is bound to the administrative network. Presumably in this case, the nodes would be defined to use the administrative network.
          Hide
          Tom Mueller added a comment -

          This feature now works.

          This was tested by editing the domain.xml to have a specific address on all of the
          listeners rather than using 0.0.0.0. For the network listeners, an
          address="w.x.y.z" attribute has to be added because address="0.0.0.0" isn't there
          by default. The server was then started and observed to be listening on the
          correct address using the netstat -an. Also, the DAS was used to create and start
          instances with this configuration.

          Show
          Tom Mueller added a comment - This feature now works. This was tested by editing the domain.xml to have a specific address on all of the listeners rather than using 0.0.0.0. For the network listeners, an address="w.x.y.z" attribute has to be added because address="0.0.0.0" isn't there by default. The server was then started and observed to be listening on the correct address using the netstat -an. Also, the DAS was used to create and start instances with this configuration.
          Hide
          Tom Mueller added a comment -
              • Issue 242 has been marked as a duplicate of this issue. ***
          Show
          Tom Mueller added a comment - Issue 242 has been marked as a duplicate of this issue. ***

            People

            • Assignee:
              Tom Mueller
              Reporter:
              Nazrul
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: