This chapter describes how to view and change Oracle Fusion Middleware port numbers, such as port numbers used by Oracle WebLogic Server or Oracle HTTP Server.
It contains the following sections:
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 Also:
Appendix D for a list of port numbers. Refer to the installation guide for directions on overriding port assignments during installation.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 asOracle HTTP Server, using Fusion Middleware Control.
For example, to view the ports of a domain:
From the navigation pane, select the domain.
From the WebLogic Domain menu, choose Monitoring, then Port Usage.
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.
Note:
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 Appendix D for information on allotted port ranges.This section provides the following topics:
For information about changing other ports, see:
"Overview of Node Manager Configuration" in the 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 a WebLogic Server Administration Server or a Managed Server using the Oracle WebLogic Server Administration Console or WLST, as described in the following topics:
See 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 a WebLogic Server Administration Server or a Managed Server using the Oracle WebLogic Server Administration Console:
Navigate to the server.
The Settings for server_name page is displayed.
Select the Configuration tab. On the General 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.
To change the non-SSL (HTTP) listen port and the SSL (HTTPS) listen port for a WebLogic Server 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()
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
On a UNIX system, if you are changing the Listen port to a number less than 1024, perform these steps before you change the Oracle HTTP Server 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, as follows:
Log in as root.
Run the following commands in the Oracle home:
cd ORACLE_HOME/ohs/bin
chown root .apachectl
chmod 6750 .apachectl
To change the Oracle HTTP Server non-SSL (HTTP) Listen port, follow the procedures in the following tasks. 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 Section 5.3.2.1.
To change the Oracle HTTP Server Listen port using Fusion Middleware Control:
From the navigation pane, expand Web Tier, then select the Oracle HTTP Server instance.
From the Oracle HTTP Server menu, choose Administration, then Ports Configuration.
Select the Listen port that uses the HTTP protocol, then click Edit.
Change the port number, then click OK.
Restart Oracle HTTP Server. (From the Oracle HTTP Server menu, choose Control, then Restart.)
To change the Oracle HTTP Server SSL (HTTPS) Listen port, follow the procedures in the following tasks. 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 Section 5.3.2.1.
To change the Oracle HTTP Server SSL Listen port using Fusion Middleware Control:
From the navigation pane, expand Web Tier, then select the Oracle HTTP Server instance.
From the Oracle HTTP Server menu, choose Administration, then Ports Configuration.
Select the Listen port that uses the HTTPS protocol, then click Edit.
Change the port number, then click OK.
Restart Oracle HTTP Server. (From the Oracle HTTP Server menu, choose Control, then Restart.)
To change the Oracle HTTP Server non-SSL and SSL Listen Ports, modify the following files:
DOMAIN_HOME/config/fmwconfig/components/OHS/instances/component_name/httpd.conf DOMAIN_HOME/config/fmwconfig/components/OHS/instances/component_name/admin.conf DOMAIN_HOME/config/fmwconfig/components/OHS/instances/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 and Oracle Database 11g 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 or Oracle Database 11g 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 Section 5.3.3.1, "Changing the KEY Value for an IPC Listener"The procedure consists of the following tasks:
Stop all components that use the Metadata Repository. See Chapter 4 for instructions.
On the metadata repository host:
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 for PORT
. 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 and port
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
(UNIX) DOMAIN_HOME/bin/startComponent.sh OID1 (Windows) DOMAIN_HOME\bin\startComponent.cmd OID1
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.)
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:
Stop the listener (ensure that your ORACLE_HOME environment variable is set first):
lsnrctl stop
Edit the listener.ora
and tnsnames.ora
files. In each file, find the following line:
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
Change it to the following:
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
Restart the listener:
lsnrctl start