Saturday, August 18, 2018

13c OEM Status Pending (Target addition is in Progress)



After discovering and adding database to my 13.2 OEM, target database is still in “status Pending (Target addition is in Progress)” even after few days

From OMS repo database……

SQL> select entity_name, entity_type, host_name, manage_status , promote_status, emd_url ,DISPLAY_NAME from SYSMAN.EM_MANAGEABLE_ENTITIES where entity_name like '%DEVDB%' and emd_url like '%oradev01%';

ENTITY_NAME            ENTITY_TYPE                         HOST_NAME            MANAGE_STATUS     PROMOTE_STATUS
---------------------- ------------------------------------------------------ -------------------- ------------- --------------
EMD_URL
-------------------------------------------------------------
DISPLAY_NAME
------------------------------------------------------------DEVDB                 oracle_database                                                  oradev01.domain.com             2              1
https://oradev01.domain.com:3872/emd/main/
DEVDB

From the above output we can see that
managed_status=2 and promote_status=1 indicates that the target is not yet promoted to the agent side


Now from Target database (DEVDB) go to the agent and check below target status

oradev01:DEVDB:/home/oracle $ cd /opt/oracle/product/oemagent/agent13c/agent_13.2.0.0.0/bin

oradev01:DEVDB:/opt/oracle/product/oemagent/agent13c/agent_13.2.0.0.0/bin $ ./emctl config agent listtargets
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
[oradev01.domain.com, host]                                 
[oradev01.domain.com:3872, oracle_emd]

If you check the above output, it doesn’t listed any of the databases existing ion the server and according to (Doc ID 2286993.1) root.sh has not been executed after the installation of Agent.
To check whether root.sh was executed on target DB

$ cd <AGENT_BASE_DIR>/sbin

oradev01:DEVDB:/opt/oracle/product/oemagent/agent13c/agent_13.2.0.0.0/sbin $ ls -ltr nm*
-rw-r----- 1 oracle dba    9615 Aug  1  2016 nmr_macro_list
-rwx--x--x 1 oracle dba 4786905 Sep 30  2016 nmo.0
-rwx--x--x 1 oracle dba 4703504 Sep 30  2016 nmoconf
-rwx--x--x 1 oracle dba   53058 Sep 30  2016 nmb.0
-rwx--x--x 1 oracle dba   50457 Sep 30  2016 nmgsshe.0
-rwx------ 1 oracle dba  104650 Sep 30  2016 nmr.0
-rwx------ 1 oracle dba   34522 Sep 30  2016 nmrconf
-rwx--x--x 1 oracle dba 4708480 Sep 30  2016 nmopdpx.0
-rwx--x--x 1 oracle dba  105929 Sep 30  2016 nmhs.0
-rwx--x--x 1 oracle dba  585242 Feb 10  2017 nmosudo.0


Hmmm looks like it is NOT

Solution:

Run Root.sh script on target server (oradev01)  as a ROOT user
Verify again owner for nm* files

[root@oradev01 root] # /opt/oracle/product/oemagent/agent13c/agent_13.2.0.0.0/root.sh
Finished product-specific root actions.
/etc exist

oradev01:DEVDB:/opt/oracle/product/oemagent/agent13c/agent_13.2.0.0.0/sbin $ ls -lrth
total 30M
-rw-r----- 1 root   dba  9.4K Aug  1  2016 nmr_macro_list
-rwx--x--x 1 oracle dba  4.6M Sep 30  2016 nmo.0
-rwx--x--x 1 oracle dba  4.5M Sep 30  2016 nmoconf
-rwx--x--x 1 oracle dba   52K Sep 30  2016 nmb.0
-rwx--x--x 1 oracle dba   50K Sep 30  2016 nmgsshe.0
-rwx------ 1 oracle dba  103K Sep 30  2016 nmr.0
-rwx------ 1 oracle dba   34K Sep 30  2016 nmrconf
-rwx--x--x 1 oracle dba  4.5M Sep 30  2016 nmopdpx.0
-rwx--x--x 1 oracle dba  104K Sep 30  2016 nmhs.0
-rwx--x--x 1 oracle dba  572K Feb 10  2017 nmosudo.0
-rwx--x--x 1 root   root 4.6M Aug  6 13:11 nmo.new.bak
-rw-r----- 1 root   dba   188 Aug  6 13:11 nmo_public_key.txt
-rwsr-x--- 1 root   dba  4.6M Aug  6 13:11 nmo
-rwsr-x--- 1 root   dba  104K Aug  6 13:11 nmhs
-rwsr-x--- 1 root   dba   52K Aug  6 13:11 nmb
-rwx------ 1 root   root 103K Aug  6 13:11 nmr.new.bak
-rwsr-x--- 1 root   dba  103K Aug  6 13:11 nmr
-rwxr-xr-x 1 root   dba  572K Aug  6 13:11 nmosudo
-rwxr-xr-x 1 root   dba   50K Aug  6 13:11 nmgsshe
-rwxr-xr-x 1 root   dba  4.5M Aug  6 13:11 nmopdpx


Now Delete the Target database from OEM and rediscover again and this time it will show as up and Running Cheers !!!!
EM 13c : After Discovery, Targets Are Stuck In "Status Pending (Target Addition In Progress)" Status (Doc ID 2286993.1)




0 comments:

Post a Comment

Auto Scroll Stop Scroll