5 Managing Ports
- About Managing Ports
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. - Viewing Port Numbers
Often, you need to know which port numbers your Oracle Fusion Middleware environment uses. - Changing the Port Numbers Used by Oracle Fusion Middleware
You can change the port numbers for some Oracle Fusion Middleware components, using Fusion Middleware Control, Oracle WebLogic Remote Console, or the command line.
Parent topic: Basic Administration
About Managing Ports
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.
Parent topic: Managing Ports
Viewing Port Numbers
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:
Parent topic: Managing Ports
Viewing Port Numbers Using the Command Line
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
Parent topic: Viewing Port Numbers
Viewing Port Numbers Using Fusion Middleware Control
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 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.
Parent topic: Viewing Port Numbers
Changing the Port Numbers Used by Oracle Fusion Middleware
You can change the port numbers for some Oracle Fusion Middleware components, using Fusion Middleware Control, Oracle WebLogic Remote Console, or the command line.
You can change a port number to any number, 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.
For information about changing other ports, see:
-
Configuring Node Manager in Administering Node Manager for Oracle WebLogic Server for information about changing the Node Manager port.
- Changing the Oracle WebLogic Server Listen Ports
- Changing the Node Manager Listen Port
- Changing the Oracle HTTP Server Listen Ports
- Changing the Oracle Database Net Listener Port
Parent topic: Managing Ports
Changing the Oracle WebLogic Server Listen Ports
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.
See Configuring the Listen Port in Administering Server Environments for Oracle WebLogic Server for more information about changing Oracle WebLogic Server ports.
Changing the Oracle WebLogic Server Listen Ports 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 Fusion Middleware Control:
- From the target navigation pane, select the server.
- From the WebLogic Server menu, select Administration, then General Settings.
- Select the Configuration tab. On the General Settings tab, change the number of the Listen Port or SSL Listen Port.
- If the server is running, restart the server.
- If other components rely on the Oracle WebLogic Server listen ports, you must reconfigure those components.
Parent topic: Changing the Oracle WebLogic Server Listen Ports
Changing the Oracle WebLogic Server Listen Ports Using WLST
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()
Parent topic: Changing the Oracle WebLogic Server Listen Ports
Changing the Node Manager Listen Port
You can change the Node Manager listen port using Fusion Middleware Control or WLST, as described in the following topics:
Changing the Node Manager Listen Port Using WLST
To change the Node Manager Listen Port using WLST:
readDomain('Domain_Home')
cd('/')
cd('NMProperties')
set('ListenPort',new_port_number)
updateDomain()
Parent topic: Changing the Node Manager Listen Port
Changing the Node Manager Listen Port Using Fusion Middleware Control
To change the Node Manager Listen Port using Fusion Middleware Control, change the configuration of the machine to point it to the new port:
Parent topic: Changing the Node Manager Listen Port
Changing the Oracle HTTP Server Listen Ports
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:
- Enabling Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (UNIX Only)
- Changing the Oracle HTTP Server Non-SSL Listen Port in a WebLogic Server Domain
- Changing the Oracle HTTP Server SSL Listen Port in a WebLogic Server Domain
- Changing the Oracle HTTP Server Listen Ports in a Standalone Domain
Enabling Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (UNIX Only)
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 (Linux and UNIX Only) in Administering Oracle HTTP Server.
Parent topic: Changing the Oracle HTTP Server Listen Ports
Changing the Oracle HTTP Server Non-SSL Listen Port in a WebLogic Server Domain
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:
Parent topic: Changing the Oracle HTTP Server Listen Ports
Changing the Oracle HTTP Server SSL Listen Port in a WebLogic Server Domain
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:
Parent topic: Changing the Oracle HTTP Server Listen Ports
Changing the Oracle HTTP Server Listen Ports in a Standalone Domain
To change the Oracle HTTP Server non-SSL and SSL Listen ports in a standalone domain:
Parent topic: Changing the Oracle HTTP Server Listen Ports
Changing the Oracle Database Net Listener Port
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, Oracle Database 14c 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, Oracle Database 14c database, they can all use port 1521. There is no need to change the listener port number.
Note:
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:
lsnrctl stop
-
Edit the
listener.ora
file, which is located at:(UNIX) ORACLE_HOME/network/admin/listener.ora (Windows) ORACLE_HOME\network\admin\listener.ora
Under the
LISTENER
entry, update the value forPORT
. Save the file. -
Edit the
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:
-
Update the
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 andport
is the new port number.
-
-
Start the metadata repository listener:
lsnrctl start
-
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:
jdbc:oracle:thin:@hostname.domainname.com:1522/orcl
-
Click Save.
-
Restart the servers that use this data source. (Click the Targets tab to see the servers that use this data source.)
-
Changing the KEY Value for an IPC Listener
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:
Parent topic: Changing the Oracle Database Net Listener Port