EMCA Fails With Error “Failed to allocate port(s) in the specified range(s) for the following proces

EMCA Fails With Error “Failed to allocate port(s) in the specified range(s) for the following process(es)”

This can occur from versions 10.1 to 11.2

Symptoms

EMCA fails to configure DBControl while allocating the ports with following error message in emca_timestamp.log file. In case of using DBCA to configure DBConsole same error is reported.

Failed to allocate port(s) in the specified range(s) for the following process(es): JMS
[5540-5559], RMI [5520-5539], Database Control [5500-5519], EM Agent [3938] | [1830-1849]

Installing a Database using Oracle Universal Installer may fail while DBConsole configuration with following error.

Invalid value null for parameter PORT
Refer to the log file at $ORACLE_HOME/cfgtoollogs/dbca//emConfig.log for more details.

emConfig.log shows

SEVERE: Invalid value null for parameter PORT
Refer to the log file at /opt/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/<instance>/emConfig.log for more details.
Jun 10, 2009 3:35:50 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Invalid value null for parameter PORT
at oracle.sysman.emcp.ParamsManager.checkParam(ParamsManager.java:2630)
at oracle.sysman.emcp.EMDBPreConfig.checkConfigParams(EMDBPreConfig.java:1285)
at oracle.sysman.emcp.EMDBPreConfig.checkParameters(EMDBPreConfig.java:1060)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:174)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:160)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:141)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:426)
at java.lang.Thread.run(Thread.java:534)

Changes

New installation and configuration.

Cause

There can be number of reasons EMCA is not able to bind respective ports.

1. Network restrictions/firewall blocking the ports
2. Incorrectly configured hostname or the hosts file
3. Incorrect entry for loopback adapter in hosts file
4. Any other application using the port in the same range.

Solution

1. Following ports in the given range should be opened on the database machine to configure DBConsole. Make sure there is no firewall blocking any of these ports.

- JMS [5540-5559] —> only one port is needed from this rage (say 5540) and make sure it is not used by other application.
- RMI [5520-5539] —> only one port is needed from this rage (say 5520) and make sure it is not used by other application.
- Database Control [5500-5519] —> only one port is needed from this rage (say 5500) and make sure it is not used by other application.
- EM Agent [3938] | [1830-1849] —> only one port is needed from this rage (say 3938) and make sure it is not used by other application.

Some OS vendors turn on a firewall service by default, for example selinux…

2. Make sure the entries in /etc/hosts file (C:WINDOWSsystem32driversetchosts in case of windows) is correct for the hostname.
Example : alias for the hostname

3. Ensure correct entry for loopback adapter in /etc/hosts file (C:WINDOWSsystem32driversetchosts in case of windows)
Example : 127.0.0.1 hostname.domain.com hostname

4. If hosts file is not used for hostname resolution update DNS with the current/correct hostname of the server. Contact network admin for this.

As a workaround use the loopback adapter in/etc/hosts file as follows:

Change:
127.0.0.1 localhost.localdomain localhost
123.44.55.66 hostname.domain.com hostname

To:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 hostname.domain.com hostname

NOTE : In this case once DBConsole configuration is completed you can revert the changes to the hosts file. You can expect to access this dbconsole on the local server only. Unless you make modifications to the client’s hosts file and add this host and its current IP address.

This entry was posted in Configuration., Oracle. Bookmark the permalink.

2 Responses to EMCA Fails With Error “Failed to allocate port(s) in the specified range(s) for the following proces

  1. arnab says:

    this is great stufff….could you please provide the solution of this problem step by step???
    thanks

    • Gary says:

      Most will be dependent upon the installation and software. You’d have to check for the firewall you are running, which depends on the OS also, update the host file, set the loopback address (Unix/Windows, same) and the DNS, which again depends upon your environment.
      Just cannot do a step-by-step for every possible environment. Metalink will invariably have documentation which may assist.
      Cheers, Gary.

Comments are closed.