Each application server instance installed on the same server
will be installed using unique ports. This includes all components that listen
on ports, such as OHS or Web Cache. This could get complicated however, the
installer checks ports before assigning them and will assign unused ports as
needed. When setting up the operating system you will need to ensure that enough
ports are available to the installer and it will do the rest. Each installation
will end with a page that displays the instance and Application Server Control
port used. You should write this information down! You can find the ports used
by an instance in the Enterprise Manager web site under the PORTS link or in the
$ORACLE_HOME/install/portlist.ini file.
One port that must be available to install the infrastructure is port 1521,
which is the Listener port for the database. That port can be shared with
another Oracle database but it must be available.
Non-standard Oracle ports
Steve Callan has these notes on non-standard Oracle ports:
"Everyone knows 1521 is the typical port number used by a listener, but how
sacrosanct is that? In other words, do other vendors know not to use 1521 for
their applications because Oracle "owns" that port number? We will see the
answer to that question later.
It is quite useful to know which ports Oracle commonly uses. It's also quite
useful to know where to find references to what the well-known ports are in case
you inherit an environment which uses more than the standard listener port of
1521.
One good thing about port usage is that this is a common thread on ports between
Windows and UNIX platforms. One major difference has to do with the location of
a file which lists port usage, but even then, the path/file name is quite
similar - /etc/services on UNIX and C:\WINDOWS\SYSTEM32\DRIVERS\ETC\SERVICES on
XP (or C:\WINNT\SYSTEM32\DRIVERS\ETC\SERVICES on NT).
Before answering the port 1521 question, we first have to play a semantics game.
What is the difference between "well-known" and "well-known?" It depends on
whether you are being technically precise or not. The term "well-known," when
used in the context of "what are the ports you shouldn't mess with because some
semi-official agency regulates these ports," refers to ports in the 0-1023
range. The semi-official agency that regulates this range is the IANA (Internet
Assigned Numbers Authority).
Oracle uses 1521 as a standard default port for one of its applications, but
Oracle does not outright own that port. Technically speaking, the port number
1521 lies within the registered port number range.
Where can you find typical Oracle-related port assignments? The installation
guide for Application Server 10g Forms and Reports Services, for example,
contains a chapter detailing common Oracle port numbers (or the range of
numbers). This is especially useful to know as a DBA when you are trying to
access an Enterprise Manager Console of a server. Without knowing the port
number, your access to the web-based control panel for Oracle (I like that
analogy) isn't just limited, but rather, just isn't possible.
Another place to find port assignment is in the oraInventory directory's
installation logs. You can also look in your ORACLE_HOME/Apache/Apache directory
if the product in question uses a web server.
OC4J Ports
To allow access to an OC4J instance, the container maintains a number of
listeners that listen on a port for a request and then pass that request to the
container. On the OC4J Server Properties page (Figure 7), a range of ports was
defined for three methods of access.
Most web applications connect to the Oracle HTTP Server (OHS) and communicate
through the Apache Java API (AJP). Another method uses a Java program to
directly call a method belonging to an EJB in the container. This is referred to
as a Remote Method Invokation (RMI). An RMI connection bypasses the OHS and
communicates directly with the OC4J container. Finally, the container can be
passed Java Messages using JMS.
OC4J containers normally maintain listeners for each of these connection
strategies. When the Oracle9iAS instance is installed, it is configured to
listen for HTTP requests on port 7777. If that port is in use, the configuration
program will increment the port number by one until it finds an unused port. The
configuration utility configures the HTTP port in the file: http-web-site.xml.
OHS will listen for HTTP requests on that port. If you remember the Server
Properties Page (Figure 7), there was a range of ports defined for AJP. When OHS
starts up, it negotiates with the OC4J container for an available port within
the defined range. Because OHS cannot communicate with the container using AJP
and receive an HTTP request on the same port, you must insure that the port
range available for AJP does not contain the HTTP request port. The AJP port is
defined in the default-web-site.xml file. If it is defined as 0, then OHS and
the container negotiate the port within the defined port range. If is defined as
a port other than 0, then OHS and the container will use the defined port.

|