Friday, November 09, 2012

EM12c: How to change the EM Agent Port?

The EMAgent uses a particular port to receive requests from the OMS. This port number is defined by default when one installs the EMAgent on a target host.
If one needs to modify this port at some point, one can use the following steps.

To change the EMAgent port:

1. Stop the EMAgent.
$ $AGENT_HOME/bin/emctl stop agent

2. Modify the $AGENT_HOME/sysman/config/emd.properties file in the EMAgent home directory:
    For example:
    EMD_URL=http://abc.xyz.com:3872/emd/main

    Modify the <port number> in the EMD_URL property so the EMAgent uses a new unused port on the target host.
    EMD_URL=http://abc.xyz.com:3875/emd/main

3. Start the EMAgent.
$ $AGENT_HOME/bin/emctl start agent

Note:
With this port change the target name of agent will not change on OMS side, it will still show the original port. But it will work using the new port now as given below

$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2 
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.2.0
OMS Version       : 12.1.0.2.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /home/oracle/agent12c/agent_inst
Agent Binaries    : /home/user01/agent12c/core/12.1.0.2.0
Agent Process ID  : 5732
Parent Process ID : 5643
Agent URL         : https://abc.xyz.com:3875/emd/main/
Repository URL    : https://oms.xyz.com:4901/empbs/upload
Started at        : 2012-11-09 10:02:47
Started by user   : oracle
Last Reload       : (none)
Last successful upload                       : 2012-11-09 11:35:21
Last attempted upload                        : 2012-11-09 11:35:21
Total Megabytes of XML files uploaded so far : 0.2
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 64.97%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2012-11-09 11:37:11
Last successful heartbeat to OMS             : 2012-11-09 11:37:11
Next scheduled heartbeat to OMS              : 2012-11-09 11:38:11

---------------------------------------------------------------
Agent is Running and Ready

3 comments:

Alexis Quirós said...

Neelima, thanks a lot, you post was very useful for me.

Alexis Quirós said...

Neelima, thanks a lot, you post was very useful for me.

Alexis Quirós said...

Neelima, thanks a lot, you post was very useful for me.