Skip Headers
Oracle® Fusion Middleware Administrator's Guide
11g Release 1 (11.1.1)

Part Number E10105-11
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5 Managing Ports

This chapter describes how to view and change Oracle Fusion Middleware port numbers.

It contains the following topics:

5.1 About Managing Ports

Many Oracle Fusion Middleware components and services use ports. Most port numbers are assigned during installation. 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 installation.

See Also:

Appendix C for a list of port numbers. Refer to the installation guide for directions on overriding port assignments during installation.

5.2 Viewing Port Numbers

You can view the port numbers currently in use with the command line or Fusion Middleware Control, as described in the following topics:

5.2.1 Viewing Port Numbers Using the Command Line

To view the current port numbers for system components, use the following command:

(UNIX) ORACLE_INSTANCE/bin/opmnctl status -l
(Windows) ORACLE_INSTANCE\bin\opmnctl status -l

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:/SOA_domain/serverConfig> get('AdministrationPort')
9002

5.2.2 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 the SOA Infrastructure and Oracle Web Cache, using Fusion Middleware Control.

For example, to view the ports of a domain:

  1. From the navigation pane, expand the farm and then WebLogic Domain.

  2. Select the domain.

  3. From the WebLogic Domain menu, choose Port Usage.

    The Port Usage page is displayed, as shown in the following figure:

    Description of ports.gif follows
    Description of the illustration ports.gif

    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 the SOA Infrastructure and Oracle Web Cache, by navigating to the target and choosing Port Usage from the target's menu.

5.3 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 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 C for information on allotted port ranges.

This section provides the following topics:

For information about changing other ports, see:

5.3.1 Changing the Oracle WebLogic Server Listen Ports

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 Also:

Oracle Fusion Middleware Configuring Server Environments for Oracle WebLogic Server for more information about changing Oracle WebLogic Server ports

5.3.1.1 Changing the Oracle WebLogic Server Listen Ports Using the Administration Console

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:

  1. Navigate to the server.

    The Settings for server_name page is displayed.

  2. On the General tab, change the number of the Listen Port or SSL Listen Port.

  3. If the server is running, restart the server.

  4. If other components rely on the Oracle WebLogic Server listen ports, you must reconfigure those components. For example for Oracle Portal, if the listen port for the Oracle WebLogic Server configured as WLS_PORTAL is changed, then you must make a corresponding change to the configuration in Oracle HTTP Server, which is pointing to the older port. Change the port number in the following file:

    ORACLE_INSTANCE/OHS/ohs_name/moduleconf/portal.conf 
    

5.3.1.2 Changing the Oracle WebLogic Server Listen Ports Using WLST

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("MW_HOME/user_projects/domains/domain_name")
cd("servers/AdminServer")
cmo.setListenPort(8001)
updateDomain()

5.3.2 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. For example, if you are using Oracle Web Cache to improve the performance of your Oracle Fusion Middleware environment, you must modify the Oracle Web Cache origin server settings whenever you modify the Oracle HTTP Server Listen ports.

The following topics describe how to modify the Oracle HTTP Server HTTP or HTTPS Listen port:

5.3.2.1 Enabling Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (UNIX Only)

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:

  1. Log in as root.

  2. Run the following commands in the Oracle home:

    cd ORACLE_HOME/ohs/bin
    chown root .apachectl
    chmod 6750 .apachectl
    

5.3.2.2 Changing the Oracle HTTP Server Non-SSL Listen Port

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.

Task 1   Modify the Oracle HTTP Server Listen Port

To change the Oracle HTTP Server Listen port using Fusion Middleware Control:

  1. From the navigation pane, expand the farm, then Web Tier, then select the Oracle HTTP Server instance.

  2. From the Oracle HTTP Server menu, choose Administration, then Ports Configuration.

  3. Select the Listen port that uses the HTTP protocol, then click Edit.

  4. Change the port number, then click OK.

  5. Restart Oracle HTTP Server. (From the Oracle HTTP Server menu, choose Control, then Restart.)

Task 2   Update Oracle Web Cache

If you are using Oracle Web Cache as a reverse proxy, you must update Oracle Web Cache:

  1. From the Fusion Middleware Control navigation pane, expand the farm, then Web Tier. Select the Oracle Web Cache instance.

  2. From the Web Cache menu, choose Administration, then Origin Servers.

  3. Select the origin server for which you have changed the port, and click Edit.

    The Edit Origin Server page is displayed.

  4. In the Port field, change the port number.

  5. Click OK.

  6. Restart Oracle Web Cache. (From the Web Cache menu, choose Control, then Restart.)

Task 3   Restart the System Components

Restart OPMN and all system components in that Oracle instance:

opmnctl stopall
opmnctl startall

5.3.2.3 Changing the Oracle HTTP Server SSL Listen Port

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.

Task 1   Modify the Oracle HTTP Server SSL Listen Port

To change the Oracle HTTP Server SSL Listen port using Fusion Middleware Control:

  1. From the navigation pane, expand the farm, then Web Tier, then select the Oracle HTTP Server instance.

  2. From the Oracle HTTP Server menu, choose Administration, then Ports Configuration.

  3. Select the Listen port that uses the HTTPS protocol, then click Edit.

  4. Change the port number, then click OK.

  5. Restart Oracle HTTP Server. (From the Oracle HTTP Server menu, choose Control, then Restart.)

Task 2   Update Oracle Web Cache

If you are using Oracle Web Cache as a reverse proxy, you must update Oracle Web Cache:

  1. From the Fusion Middleware Control navigation pane, expand the farm, then Web Tier. Select the Oracle Web Cache instance.

  2. From the Web Cache menu, choose Administration, then Origin Servers.

  3. Select the origin server for which you have changed the port, and click Edit.

    The Edit Origin Server page is displayed.

  4. In the Port field, change the port number.

  5. Click OK.

  6. Restart Oracle Web Cache. (From the Web Cache menu, choose Control, then Restart.)

Task 3   Re-register mod_osso

If you are using Oracle Single Sign-On, you must use Release 10.1.4.3. If you have enabled Oracle Single Sign-On authentication (that is, you registered mod_osso), follow these steps to re-register mod_osso:

  1. On the Oracle Single Sign-On host, set the environment variables ORACLE_HOME and ORACLE_SID.

  2. On the Oracle Single Sign-On host, run the ssoreg script, using the -remote_midtier option. The script is located at:

    (UNIX) ORACLE_HOME/sso/bin/ssoreg.sh
    (Windows)ORACLE_HOME\sso\bin\ssoreg.bat
    

    For example, on LINUX:

    $ORACLE_HOME/sso/bin/ssoreg.sh -oracle_home_path $ORACLE_HOME
     -config_mod_osso TRUE 
     -site_name example.com:7778  
     -remote_midtier 
     -config_file $ORACLE_HOME/Apache/Apache/conf/osso/myosso.conf 
     -mod_osso_url http://example.com:7778
    

    The resulting configuration file (myosso.conf in the example) is an obfuscated osso configuration file.

  3. Copy the obfuscated osso configuration file to the Oracle HTTP Server host moduleconf directory for editing:

    ORACLE_INSTANCE/config/OHS/ohs_name/moduleconf
    
Task 4   Restart System Components

Restart OPMN and the system components in that Oracle instance:

opmnctl stopall
opmnctl startall

5.3.3 Changing Oracle Web Cache Ports

You can change the HTTP and HTTPS listen ports, the administration port, the statistics port and the invalidation port for Oracle Web Cache using Fusion Middleware Control.

To change the port number:

  1. From the navigation pane, expand the farm, then Web Tier, then select the Oracle Web Cache instance.

  2. From the Web Cache menu, choose Administration, then Ports Configuration.

  3. Select a port, then click Edit.

  4. Change the port number, then click OK.

  5. Restart Oracle Web Cache. (From the Web Cache menu, choose Control, then Restart.)

  6. If you reconfigure the Web Cache invalidation port and you use Oracle Portal, you must update the port information maintained by Oracle Portal, as described in Section 5.3.5.2.

5.3.4 Changing OPMN Ports (ONS Local, Request, and Remote)

This section describes how to change any of the following port numbers:

  • ONS Local port

  • ONS Request port

  • ONS Remote port

To change these ports:

  1. Stop OPMN, and all OPMN-managed processes:

    (UNIX) ORACLE_INSTANCE/bin/opmnctl stopall
    (Windows)ORACLE_INSTANCE\bin\opmnctl stopall
    
  2. Open the opmn.xml file:

    (UNIX) ORACLE_INSTANCE/config/OPMN/opmn
    (Windows) ORACLE_INSTANCE\config\OPMN\opmn
    
  3. Under the <notification-server> element, modify the local, remote, or request parameter, depending on the port you are changing, in the <port> element, and then save the file.

    For example:

    <port local="6101" remote="6201" request="6004"/>
    
  4. Start OPMN, and all OPMN-managed processes:

    (UNIX) ORACLE_INSTANCE/bin/opmnctl startall
    (Windows) ORACLE_INSTANCE\bin\opmnctl startall
    

5.3.5 Changing Oracle Portal Ports

Oracle Portal maintains information about some of the ports used by its underlying components. This section describes how to manage Oracle Portal ports. It includes the following topics:

Note:

When you change these ports as described in this section, only the Oracle Portal configuration is updated. To update or change the port numbers of an underlying component, such as Oracle Web Cache or Oracle Internet Directory, see the component-specific documentation for information about managing ports.

The configuration procedures described in this section require you to restart the WLS_PORTAL Managed Server.

5.3.5.1 Changing the Oracle Portal Midtier Port

In a default installation, you can access Oracle Portal through the Oracle Web Cache port, such as 8090. This port is referred to as the Oracle Portal midtier port. You must update this port if Oracle Web Cache is configured to listen on a different port or Oracle Web Cache is front-ended by a Proxy or Load Balancing Router (LBR).

To change the Oracle Portal midtier port using Fusion Middleware Control:

  1. From the navigation pane, expand the farm, choose Portal, and select the Portal instance.

  2. From the Portal menu, choose Settings, and then Wire Configuration,

  3. Select the Database Access Descriptor, such as portal.

  4. Expand the Portal Midtier section.

  5. Change the port number, and click Apply.

  6. Restart the WLS_PORTAL Managed Server. For more information, see Section 5.3.5.6.

5.3.5.2 Changing the Oracle Web Cache Invalidation Port for Oracle Portal

Oracle Portal caches content in Oracle Web Cache. When content changes, Oracle Portal invalidates such cached content and maintains the Oracle Web Cache invalidation port. If you reconfigure the Web Cache invalidation port, you must update the port information maintained by Oracle Portal.

To change the Oracle Portal Invalidation port using Fusion Middleware Control:

  1. From the navigation pane, expand the farm, choose Portal, and select the Portal instance.

  2. From the Portal menu, choose Settings, and then Wire Configuration.

  3. Select the Database Access Descriptor, such as portal.

  4. Expand the Web Cache section.

  5. Change the Invalidation Port number. If the Invalidation user name and the password are blank, enter the user name and the password.

    Note:

    The Port number, Invalidation user name, and Invalidation password entered here must match the corresponding values of the Oracle Web Cache instance used by Oracle Portal. For more information about resetting these values, see the Oracle Fusion Middleware Administrator's Guide for Oracle Web Cache.
  6. Click Apply.

  7. Restart the WLS_PORTAL Managed Server. For more information, see Section 5.3.5.6.

5.3.5.3 Changing the Oracle Internet Directory Port for Oracle Portal

Oracle Portal maintains information about Oracle Internet Directory ports.

To change the Oracle Portal Oracle Internet Directory (OID) port using Fusion Middleware Control:

  1. From the navigation pane, expand the farm, choose Portal. and select the Portal instance.

  2. From the Portal menu, choose Settings, and then Wire Configuration.

  3. Select the Database Access Descriptor, such as portal.

  4. Expand the OID section.

  5. Change the port number.

  6. Enter the Oracle Internet Directory user name and the password.

  7. Click Apply.

  8. Restart the WLS_PORTAL Managed Server. For more information, see Section 5.3.5.6.

5.3.5.4 Changing the PPE Loopback Port

While servicing Portal pages, Oracle Portal makes loopback calls using the default site port. In some configurations, such as external SSL, you must configure the loopback call to a port other than the default site port.

To change the PPE Loopback port using Fusion Middleware Control:

  1. From the navigation pane, expand the farm, choose Portal, and select the Portal instance.

  2. From the Portal menu, choose Settings, and then Page Engine.

  3. Expand the Advanced Properties section.

  4. Change the port number in the Use Port.

  5. Specify the protocol in the Use Protocol field.

  6. Click Apply.

  7. Restart the WLS_PORTAL Managed Server. For more information, see Section 5.3.5.6.

5.3.5.5 Changing Oracle Portal SQL*Net Listener Port

Oracle Portal maintains information about the repository connection in the host:port:servicename format inside a Database Access Descriptor (in a file named portal_dads.conf). If the SQL*Net listener is reconfigured to listen on a different port, you must reconfigure this port value in Oracle Portal.To change the Oracle Portal SQL*Net Listener port in Fusion Middleware Control:

  1. From the navigation pane, expand the farm, choose Portal, and select the Portal instance.

  2. From the Portal menu, choose Settings, and then Database Access Descriptor.

  3. Select the Database Access Descriptor, such as /pls/portal.

  4. Click Edit.

  5. Expand the Portal Database Access Details section.

  6. Update the Database Connect String field to reflect the new port.

  7. Click OK.

  8. Restart the WLS_PORTAL Managed Server. For more information, see Section 5.3.5.6.

5.3.5.6 Restarting WLS_PORTAL Managed Server

To restart WLS_PORTAL Managed Server in Fusion Middleware Control:

  1. Expand the Farm domain, such as Farm_ClassicDomain.

  2. Expand WebLogic Domain.

  3. Expand the domain, such as Classic Domain.

  4. Expand cluster_portal, when applicable.

  5. Choose WLS_PORTAL.

  6. From the WLS_PORTAL WebLogic Server menu, choose Control, then Shut Down. Ensure that the status of WLS_PORTAL shows Down.

  7. From the WLS_PORTAL WebLogic Server menu, choose Control, then Start Up. Ensure that the status of WLS_PORTAL shows Up.

5.3.6 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 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.6.1, "Changing the KEY Value for an IPC Listener"

A metadata repository may be used in several different ways. Use the following table to determine the steps that are required for changing your type of metadata repository:

The procedure consists of the following tasks:

Task 1   Stop Components

Stop all components that use the Metadata Repository. See Chapter 4 for instructions.

Task 2   Change the Metadata Repository for Oracle Net Listener Port

On the metadata repository host:

  1. Ensure that the ORACLE_HOME and ORACLE_SID environment variables are set.

  2. Stop the metadata repository listener:

    lsnrctl stop
    
  3. 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.

  4. 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:

    1. Update the PORT value in each entry that applies to MDS Repository.

    2. 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.

  5. Start the metadata repository listener:

    lsnrctl start
    
  6. 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;
    
  7. Using SQL*Plus, restart the metadata repository:

    SQL> SHUTDOWN
    SQL> STARTUP
    
  8. Start Oracle Internet Directory:

    opmnctl start
    opmnctl startproc ias-component=OID
    
Task 3   Change the System Data Source

Change the system data source to use the new port number for the metadata repository. To do so, you use Oracle WebLogic Server Administration Console:

  1. In the Change Center, click Lock & Edit.

  2. In the Domain Structure section, expand Services and select Data Sources.

    The Summary of JDBC Data Sources page is displayed.

  3. Select the data source you want to change.

    The Settings page is displayed.

  4. Select the Connection Pool tab.

  5. To change the database port, modify the URL field. For example:

    jdbc:oracle:thin:@hostname.domainname.com:1522/orcl
    
  6. Click Save.

  7. Restart the servers that use this data source. (Click the Target tab to see the servers that use this data source.)

Task 4   Update Oracle Internet Directory

On the Identity Management host, update Oracle Internet Directory with the new Oracle Net listener port number:

  1. Update the port number in tnsnames.ora file, which is located in the following directory:

    (UNIX) ORACLE_INSTANCE/config
    (Windows) ORACLE_INSTANCE\config
    
  2. Update the registration of the component with the Administration Server, using the opmnctl updatecomponentregistration command with the new port number, as shown in the following example:

    opmnctl updatecomponentregistration -Db_info DBHostName:TNSPORT:DBSERVICENAME 
       -componentName oid1 -componentType OID
    
  3. Start OPMN and all processes in the Oracle instance in the Oracle Internet Directory Oracle home:

    opmnctl startall
    
Task 5   Update Oracle Single Sign-On

If you are using Oracle Single Sign-On, from the Oracle Single Sign-On Oracle home:

  1. On UNIX systems, set the LD_LIBRARY_PATH, LD_LIBRARY_PATH_64, LIB_PATH, or SHLIB_PATH environment variables to the proper values, as shown in Table 3-1. The actual environment variables and values that you must set depend on the type of your UNIX operating system.

  2. Update Oracle Single Sign-On with the new repository port number by executing the following command:

    • On UNIX systems:

      $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/sso/lib/ossoca.jar reassoc -repos $ORACLE_HOME
      
    • On Windows systems:

      %ORACLE_HOME%\jdk\bin\java -jar %ORACLE_HOME%\sso\lib\ossoca.jar reassoc -repos %ORACLE_HOME%
      
Task 6   Update Oracle Portal

To update Oracle Portal, follow the steps in Section 5.3.5.5.

Task 7   Update Other Components

In each Oracle instance that uses the metadata repository:

  1. Update the following file with the new Oracle Net listener port number:

    (UNIX) ORACLE_INSTANCE/config/tnsnames.ora
    (Windows) ORACLE_INSTANCE\config\tnsnames.ora
    
  2. Check the following file:

    (UNIX) ORACLE_HOME/ohs/conf/dads.conf
    (Windows) ORACLE_HOME\ohs\modplsql\conf\dads.conf
    

    Locate the line that begins with PlsqlDatabaseConnectString.

    • If the line ends with ServiceNameFormat or SIDFormat, update the line with the new MDS Repository port number, save the file, and restart Oracle HTTP Server.

    • If the line ends with NetServiceNameFormat, you do not need to do anything.

  3. Start the components that use the metadata repository, as described in Section 4.3.

5.3.6.1 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:

  1. Stop the listener (ensure that your ORACLE_HOME environment variable is set first):

    lsnrctl stop
    
  2. 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))
    
  3. Restart the listener:

    lsnrctl start