Many Oracle Fusion Middleware components and services use ports. Most port numbers are assigned during domain creation. As an administrator, it is important to know the port numbers used by these services, and to ensure that the same port number is not used by two services on your host.
For some ports, you can specify a port number assignment during domain creation.
See Port Numbers for a list of port numbers commonly assigned during installation. Refer to the installation guide for directions on overriding port assignments during installation.
Often, you need to know which port numbers your Oracle Fusion Middleware environment uses.
You can view the port numbers currently in use with the command line or Fusion Middleware Control, as described in the following topics:
To view the port numbers for Oracle WebLogic Server, you can use the WLST
get command, with an attribute. For example, to get the Administration Port, use the following command:
wls:/WLS_domain/serverConfig> get('AdministrationPort') 9002
You can view the port numbers of the domain, the Administration Server, Managed Servers, or components, such as Oracle HTTP Server, using Fusion Middleware Control.
For example, to view the ports of a domain:
The Port Usage page is displayed, as shown in the following figure:
Optionally, you can filter the ports shown by selecting a Managed Server from Show.
The Port Usage detail table shows the ports that are in use, the IP Address, the component, the channel, and the protocol.
You can also view similar pages for the Administration Server, Managed Servers, and components, such as Oracle HTTP Server, by navigating to the target and choosing Port Usage from the target's menu.
You can change the port numbers for some Oracle Fusion Middleware components, using Fusion Middleware Control, Oracle WebLogic Server Administration Console, or the command line.
You can change a port number to any number you want, if it is an unused port. You do not have to use a port in the allotted port range for the component. See Port Numbers for information on allotted port ranges.
This section provides the following topics:
For information about changing other ports, see:
Configuring Node Manager in Oracle Fusion Middleware Administering Node Manager for Oracle WebLogic Server for information about changing the Node Manager port.
You can change the non-SSL (HTTP) listen port and the SSL (HTTPS) listen port for an Administration Server or a Managed Server using Fusion Middleware Control or WLST, as described in the following topics:
See Configuring the Listen Port in Oracle Fusion Middleware Administering Server Environments for Oracle WebLogic Server for more information about changing Oracle WebLogic Server ports.
To change the non-SSL (HTTP) listen port and the SSL (HTTPS) listen port for an Administration Server or a Managed Server using Fusion Middleware Control:
To change the non-SSL (HTTP) listen port and the SSL (HTTPS) listen port for an Administration Server or a Managed Server using the WLST command line. You must run the commands in offline mode; that is, you must not be connected to a server.
For example, to change the Administration Server HTTP listen port to port 8001, use the following WLST commands:
readDomain("oracle/config/domains/domain_name") cd("servers/AdminServer") cmo.setListenPort(8001) updateDomain()
You can change the Node Manager listen port using Fusion Middleware Control or WLST, as described in the following topics:
To change the Node Manager Listen Port using WLST:
readDomain('Domain_Home') cd('/') cd('NMProperties') set('ListenPort',new_port_number) updateDomain()
To change the Node Manager Listen Port using Fusion Middleware Control, change the configuration of the machine to point it to the new port:
To change the Oracle HTTP Server Listen ports (non-SSL or SSL), there are often dependencies that must also be set.
The following topics describe how to modify the Oracle HTTP Server HTTP or HTTPS Listen port:
By default, Oracle HTTP Server runs as a non-root user (the user that installed Oracle Fusion Middleware). On UNIX systems, if you change the Oracle HTTP Server Listen port number to a value less than 1024, you must enable Oracle HTTP Server to run as root.
For information about enabling the Listen port to run as root see Starting Oracle HTTP Server Instances on a Privileged Port (Unix Only) in Oracle Fusion Middleware Administering Oracle HTTP Server.
To change the Oracle HTTP Server non-SSL (HTTP) Listen port, take the following steps. Note that, on a UNIX system, if you are changing the Listen port to a number less than 1024, you must first perform the steps in Enabling Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (UNIX Only).
To change the Oracle HTTP Server Listen port using Fusion Middleware Control:
Save the configuration.
To change the Oracle HTTP Server SSL (HTTPS) Listen port, take the following steps. Note that, on a UNIX system, if you are changing the Listen port to a number less than 1024, you must perform the steps in Enabling Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (UNIX Only).
To change the Oracle HTTP Server SSL Listen port using Fusion Middleware Control:
Save the configuration.
To change the Oracle HTTP Server non-SSL and SSL Listen ports in a standalone domain, modify the following files:
DOMAIN_HOME/config/fmwconfig/components/OHS/component_name/httpd.conf DOMAIN_HOME/config/fmwconfig/components/OHS/component_name/admin.conf DOMAIN_HOME/config/fmwconfig/components/OHS/component_name/ssl.conf
If your environment includes an Oracle Database that functions as a metadata repository, and you want to change the listener port number for that database, perform the procedure in this section.
First, determine if it is necessary to change the listener port number. If you are concerned that you have another database on your host using the same port, both databases can possibly use the same port.
Note that multiple Oracle Database 10g, Oracle Database 11g, Oracle Database 12c databases can share the same Oracle Net listener port. If you are using an Oracle Database as a metadata repository on the same host that contains another Oracle Database 10g, Oracle Database 11g, Oracle Database 12c database, they can all use port 1521. There is no need to change the listener port number.
To run two listeners that use the same key value on one host, refer to Changing the KEY Value for an IPC Listener
To change the database listener port:
Stop all components that use the metadata repository. See Starting and Stopping Oracle Fusion Middleware for instructions.
On the metadata repository host, change the Oracle Net listener port for the metadata repository:
Ensure that the ORACLE_HOME and ORACLE_SID environment variables are set.
Stop the metadata repository listener:
listener.ora file, which is located at:
(UNIX) ORACLE_HOME/network/admin/listener.ora (Windows) ORACLE_HOME\network\admin\listener.ora
LISTENER entry, update the value for
PORT. Save the file.
tnsnames.ora file. The default location is:
(UNIX) ORACLE_HOME/network/admin/tnsnames.ora (Windows) ORACLE_HOME\network\admin\tnsnames.ora
Make the following changes to the file:
PORT value in each entry that applies to MDS Repository.
Add an entry similar to the following:
newnetport = (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = hostname) (PORT = port)))
In the example,
hostname is the fully qualified host name and
port is the new port number.
Start the metadata repository listener:
Using SQL*Plus, log in to the metadata repository as the SYSTEM user with SYSDBA privileges and run the following command:
SQL> ALTER SYSTEM SET local_listener='newnetport' scope=spfile;
Using SQL*Plus, restart the metadata repository:
SQL> SHUTDOWN SQL> STARTUP
Change the system data source to use the new port number for the metadata repository. To do so, you can use Fusion Middleware Control:
In the Change Center, click Lock & Edit.
In the navigation pane, expand select the domain.
The WebLogic Domain page is displayed.
From the WebLogic Domain menu, select JDBC Data Sources.
The Summary of JDBC Data Sources page is displayed.
Select the data source you want to change.
The JDBC Data Source page is displayed.
Select the Connection Pool tab.
To change the database port, modify the Database URL field. For example:
Restart the servers that use this data source. (Click the Targets tab to see the servers that use this data source.)
It is not possible to run two listeners at the same time that are configured to use the same KEY value in their IPC protocol address. By default, the metadata repository listener has its IPC KEY value set to EXTPROC. Hence, if your computer has another IPC listener that uses the EXTPROC key, you should configure the metadata repository listener to use some other key value such as EXTPROC1.
To change the KEY value of an IPC listener:
tnsnames.orafiles. In each file, find the following line:
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
Change it to the following:
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))