Thursday, December 24, 2009

How to reload Grid Agent with a new OMS installation


Applies to:
Enterprise Manager Grid Control - Version: 10.1.0.2 to 10.1.0.3
This problem can occur on any platform.



 Symptoms
Oracle Management Agent, version 10.1.0.2.0 (or 10.1.0.3.0), is not able to upload to Oracle Management Server.

emctl upload returns the error:
"OMS VERSION NOT CHECKED YET"

emctl status agent shows a backlog of files waiting to be uploaded and no data in the OMS Version field.


Cause
After a new OMS installation, Grid Agent still tries communicate with an OMS server during an old communication key file repoconn.ora which is located in $AGENT_HOME/sysman/config/server directory. It is necessary to syncronize this file with OMS server in order receive a permission to upload XML files through SSL connection.

Solution
To implement the solution, please execute the following steps:

1.      Go to $AGENT_HOME/sysman/config directory on Manager Server and find the path to the following URL:

oragrid:/oracle/oms10g/sysman/config>grep emdWalletSrcUrl emd.properties

emdWalletSrcUrl=http://dbalinux:4890/em/wallets/emd


2.      Go to $AGENT_HOME\sysman\config directory on Agent Server. Replace emdWalletSrcUrlkey in emd.properties file with appropriate key you found in previous step.
3.      Request a new communication key from OMS by entering the following command on the Agent Server. Provide the right password to the manager server :

C:\oracle\products\ora_agent\agent10g\bin>emctl secure agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright © 1996, 2006 Oracle Corporation.  All rights reserved.
Enter Agent Registration password :
********
   Response From Agent: running
Agent successfully stopped…   Done.
Securing agent…   Started.
Requesting an HTTPS Upload URL from the OMS…   Done.
Requesting an Oracle Wallet and Agent Key from the OMS…   Done.
Check if HTTPS Upload URL is accessible from the agent…   Done.
Configuring Agent for HTTPS in CENTRAL_AGENT mode…   Done.
EMD_URL set in C:\oracle\products\oraagent\agent10g/sysman/config/emd.properties

Securing agent…   Successful.
   Response From Agent: running
Agent successfully restarted…   Done.



4.      Start agent, in the case it is not running, issue an agent clearstate and force an upload to the OMS:

C:\oracle\products\ora_agent\agent10g\bin>emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright © 1996, 2006 Oracle Corporation.  All rights reserved.
The Oracleagent10gAgent service is starting………..
The Oracleagent10gAgent service was started successfully.

C:\oracle\products\ora_agent\agent10g\bin>emctl clearstate agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright © 1996, 2006 Oracle Corporation.  All rights reserved.
EMD clearstate completed successfully

C:\oracle\products\ora_agent\agent10g\bin>emctl upload agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright © 1996, 2006 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload completed successfully


5.      If agent still does not upload files then make the following on Manager Server:

oragrid@dbalinux:/oracle>emctl secure oms -sysman_pwd *******
Oracle Enterprise Manager 10g Release 10.2.0.1.0
Copyright © 1996, 2005 Oracle Corporation.  All rights reserved.
Enter Agent Registration password :
OPMN processes successfully stopped…   Done.
Securing central oms   Started.
Checking Repository…   Done.
Checking Em Key…   Done.
Checking Repository for an existing Enterprise Manager Root Key…   Done.
Generating Enterprise Manager Root Key (this takes a minute)…   Done.
Fetching Root Certificate from the Repository…   Done.
Generating Registration Password Verifier in the Repository…   Done.
Generating Oracle Wallet Password for Enterprise Manager OMS…   Done.
Generating Oracle Wallet for Enterprise Manager OMS…   Done.
Generating Oracle Wallet for iAS HTTP Server…   Done.
Updating HTTPS port in emoms.properties file…   Done.
Generating HTTPS Virtual Host for Enterprise Manager OMS…   Done.
Securing central oms   Ended.
OPMN processes successfully restarted…   Done.

No comments: