How to Recover Agent Home on OMS got deleted accidentally


How to Recover Agent Home on OMS got deleted accidentally

Ensure that no agent java process is alive from the agent home

1. Rename agent_inst directory under agent base: /usr/oraoms/product/Agent12c/* --> You donot have agent_inst dir

2. Run the following command to reconfigure agent:

NOTE: Replace all the required fields in the below command as per your environment

$ cd /usr/oraoms/product/Agent12c/core/12.1.0.5.0/sysman/install
$ agentDeploy.bat AGENT_BASE_DIR=/usr/oraoms/product/Agent12c AGENT_INSTANCE_HOME=/usr/oraoms/product/Agent12c/agent_inst AGENT_PORT=<Agent-Port> -configOnly OMS_HOST=<OMS HOSTNAME WITH DOMAIN> EM_UPLOAD_PORT=<OMS HTTPS UPLOAD PORT> AGENT_REGISTRATION_PASSWORD=<PROVIDE AGENT REGISTRATION PASSWORD>

3. If the above command completes successfully then follow the below steps:

<AGENT_HOME>/BIN> ./emctl stop agent
<AGENT_HOME>/BIN> ./emctl secure agent
<AGENT_HOME>/BIN> ./emctl start agent
<AGENT_HOME>/BIN> ./emctl config agent addinternaltargets
<AGENT_HOME>/BIN> ./emctl upload

After Performing above steps we still see that the weblogic targets are missing.

Follow Doc ID 1567439.1 

EM 12c: Three Methods (Console, emcli and Auto-discovery) for Discovering Fusion Middleware Products (SOA/OID/IDM/OBIEE/FORMS/OSB/OVD) and WebLogic Domain Targets in Enterprise Manager 12c Cloud Control (Doc ID 1567439.1)


Discovery Using the EMCLI

=====================



From:

Oracle® Enterprise Manager Command Line Interface
12c Release 1 (12.1.0.3)
Part Number E17786-08
Chapter 4 Verb Reference
Section titled: Verb Categories/Discover and Push to Agents Verbs/discover_wls
URL:
http://docs.oracle.com/cd/E24628_01/em.121/e17786/cli_verb_ref.htm#CACJAFBG



List of parameters for the EMCLI command:

<WebLogic Server version>
<Administration Server Host>
<port>
<username>
<password>
<External Parameters - OPT>,<JMX Protocol - OPT>
<JMX Service URL - OPT>,<Unique Domain Identifier>
<Agent URL/>
<Discover Down Servers - optional - Default if not specified is false (Starting PS1). Before PS1 default was true>,<Use Credential Store - optional - Default if not specified is false>



On the OMS server or another location where emcli is installed, configured and sync'ed, do these steps:

a) Login to .../Middleware/oms/bin/emcli:

a) [oracle@gridapps bin]$ ./emcli login -username=SYSMAN

Enter password

Login successful



b) Create a file for the discovery

Example: vi emcli_wls_disc

Add the values for the parameters

[oracle@gridapps bin]$ cat emcli_wls_disc
10,test-fmw1.us.oracle.com,7001,weblogic,oracle123,,,,SOA_FARM,https://gridapps.us.oracle.com:3872/emd/main/

10 is version of WLS

test-fmw1.us.oracle.com is Admin Server Host

7001 is Port

weblogic is Username

oracle123 is Password

,,,, Are optional parameter ( Skipped by , sign)

SOA_FARM is the name of FARM

https://gridapps.us.oracle.com:3872/emd/main/ is Agent URL



 c) After adding the values for the domain, run the following command:

[oracle@gridapps bin]$ ./emcli discover_wls -input_file=domain_discovery_file:emcli_wls_disc

============================================================================================================================

Successful: Discovery (Version: 10) --> test-fmw1.us.oracle.com, 7001 as user - weblogic

Discovery successfully. All targets were discovered and saved to EM agents.

NOTE:
1) External parameters were not provided. They might be needed to tune JVM.



 d) Check the console Targets page. A new farm should have been added to the console.

Comments

Popular posts from this blog

Useful OEM Queries to get Target details from OEM Repository

WARNING: Subscription for node down event still pending' in Listener Log

ORA-65139: Mismatch between XML metadata file and data file