Unifying Admin Port

Status of the document: Under Consideration

Introduction

Unfortunately, in the previous major release of Application Server (8.1), it was decided that domains created using the Enterprise Edition will use 4849 as the default admin port with security being enabled and those created using Platform Edition will use 4848 as the default admin port with security being disabled.
This has caused rather too much of confusion and we cannot afford the loss of usability because of this decision anymore. Hence, this particular document proposes that we make the default admin port as 4848 for all application server distributions. The only impacted distribution by this decision is the Enterprise Edition. The GlassFish distribution, Sun's Application Server Platform Edition and Java EE SDK (Application Platform SDK) distributions thereof are _not_affected by this proposal. It is important that this proposal is approved by compatibility impact team.

Details

Recently, Jeanfrancois implemented the port unification at the TCP layer and we initially thought that this would help in this regard. Well, it can help, but not without a penalty under the covers in terms of reserving port 4848 every time you need port 4849 for administrative purposes. This means that we have one more port to occupy at the domain startup for the domain that needs 4849. In addition to this, the asadmin needs to implement the redirection (See IssueTracker issue 1514) and we don't have enough time to do that for GlassFish V2 release. Thus, we have decided that we will not fix the issue 1713 that asks for admin port redirection, for this release. Note however, that protocol has already been proxied for whatever admin port there is (in other words, the admin console/asadmin are available at both http://host:admin-port and https://host:admin-port).

Owing to the above reasons, what's being proposed hereby is that we truly unify the port in that, by default, the admin port is reserved to be 4848 for all the distributions.

Compatibility Impact

In order to preserve the backward compatibility, we can take help of the the recently introduced asadminenv.conf. Please take a look at the order of preferences with which asadmin processes the options. According to that, following is the (relevant) order in which the port and secure status of admin listener is determined:

  1. Look into asadminenv.conf preferences file.
  2. Look into the defaults that are set in the code.

If the upgrade procedure does the following:

  1. create asadminenv.conf file if not present
  2. populate it as the following when target installation is PE:
    • AS_ADMIN_PORT=4848
    • AS_ADMIN_SECURE=false
    • AS_ADMIN_PROFILE=developer
  3. populate it as the following when target installation is EE: (This is just for this release)
    • AS_ADMIN_PORT=4848
    • AS_ADMIN_SECURE=true
    • AS_ADMIN_PROFILE=enterprise
  • The asadmin CLI will use previous admin ports as defaults.
  • The admin console will continue to be available at default port(s) as the upgrade tool does not modify the domain's configuration unnecessarily. Thus if the user has changed the value of the port to the non-default one, then upgrade tool preserves those changed ports.
  • If the users want to preserve the default port to 4849 after the upgrade, then they have to modify the asadminenv.conf file to reflect it. This is the incompatible change and workaround. If we don't want to keep this manual step, then upgrade tool has to set it to 4849 for this release and then next release of upgrade tool should set it to 4848. (This is rather convoluted).

Action Items

ID Details Owner(s) Done? (Y/N)
Installer
  • All types of installers should show only 4848 as the port for
    administration. * Installer screens should be modified to display 4848 by default. Setup scripts (e.g.
    GlassFish) should only have 4848 as admin port.
Snjezana, Dinesh N
Upgrade Tool See above. Also, change the class-action script (i.asadminenv) to have the default values for package based installation. This should be defaults, no token replacement involved. We should document that if the users want to preserve the old behavior, they change the asadminenv.conf file manually. Prasad, Satish N
asadmin Remove occurrences of 4849 if any. Fix usage text to only display 4848. Jane, Kedar N
Documentation Remove all occurrences of 4849 from manpages and admin guide, other guides. Paul, Vipin N