PKI-04015: Trusted cert cannot be removed

Trying to remove the trusted certificates from the wallet and getting the errors 

$ orapki wallet remove -wallet . -trusted_cert_all
Oracle PKI Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.

Enter wallet password:
PKI-04015: Trusted cert cannot be removed. CN=A,O=B,C=C

SOLUTION

$ orapki wallet display -wallet .
Oracle PKI Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.

Enter wallet password:
Requested Certificates:
User Certificates:
Subject:        CN=A,O=B,C=C
Trusted Certificates:
Subject:        CN=A,O=B,C=C
$orapki wallet remove -wallet . -trusted_cert -dn "CN=A,O=B,C=C"
$ orapki wallet remove -wallet . -cert_req -dn "CN=A,O=B,C=C"
$ orapki wallet display -wallet .
Oracle PKI Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.

Enter wallet password:
Requested Certificates:
User Certificates:
Trusted Certificates:

ORA-01591: lock held by in-doubt distributed transaction 1.23.456789

SQL>  select local_tran_id from dba_2pc_pending;

LOCAL_TRAN_ID
----------------------
1.23.456789
SQL> select local_tran_id, state,fail_time,force_time, retry_time 
     from dba_2pc_pending;

LOCAL_TRAN_ID  STATE   FAIL_TIME   RETRY_TIME  MIXED
------------   -----   ---------   ----------  -----
1.23.456789    prepared 1-OCT-23   22-OCT-23    no
SQL> rollback force '1.23.456789';

Rollback complete.

SQL> exec dbms_transaction.purge_lost_db_entry( '1.23.456789');
BEGIN dbms_transaction.purge_lost_db_entry( '1.23.456789'); END;

*
ERROR at line 1:
ORA-01453: SET TRANSACTION must be first statement of transaction
ORA-06512: at "SYS.DBMS_TRANSACTION", line 74
ORA-06512: at "SYS.DBMS_TRANSACTION", line 96
ORA-06512: at line 1

SQL>exec dbms_transaction.purge_lost_db_entry('1.23.456789');

PL/SQL procedure successfully completed.

SQL> select local_tran_id from dba_2pc_pending;

no rows selected

How to Clone 11.2 Oracle Client Software

Client accidently uninstalled Oracle 11.2 Oracle client. Here is the quick way to clone 11.2 Oracle client from another server installations.

Make a tar or zip of the Oracle Client home from another server.

$ tar -cvf 11204.tar ./client_1

2. scp the tar file to the server

3. Untar the file to the location of the same directory path like the source server.

$cd /u01/app/oracle/product/11.2.0.4

$tar -xvf 11204.tar

4. Clone the home

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/client_1

export PATH=$ORACLE_HOME/bin:$PATH:

The run the following command in one line:

$ORACLE_HOME/oui/bin/runInstaller -silent -clone ORACLE_BASE="/u01/app/oracle/"  ORACLE_HOME="/u01/app/oracle/product/11.2.0.4/client_1" ORACLE_HOME_NAME="Oracle11204_client" -invPtrLoc="/u01/app/oracle/oraInventory"

Software Library OMS Shared location default_loc is not accessible

Failed to pass checking accessibility by :

Login to EM > Setup > Provisioning and Patching > Software Library
Click to highlight the row > Actions(drop-down) > Check Accessibility

Solution

Make sure OMS host preferred credential is setup correctly.

Short Running Metric Collection Status is DOWN in OEM Cloud Control

Short Running Task Worker metric collection status is shown as Down from OMS and Repository monitoring :

From the Management Services and Repository target page, Navigate:

OMS and Repository > Monitoring > All Metrics > select Repository Operations Status

Following query running as sysman shows No Short Running task workers are running, which causes a backlog build up.

SQL> SELECT Decode(task_class_list, 0 , 'Short Running' , 1, 'Long Running ' , 'Unkown') Worker_type,
CASE
WHEN j.job_action IS NULL THEN 'No'
WHEN j.job_action IS NOT NULL THEN 'Yes'
    END AS job_submitted,
    j.state AS job_state,
    w.job_id AS worker_id,
Decode(w.worker_status, 0,'Starting', 1, 'Started', 'Stop Pending') worker_status
    FROM dba_scheduler_jobs j, MGMT_collection_workers w
    WHERE j.job_action(+) = 'EM_TASK.WORKER(' || w.job_id || ');'
   AND w.task_class_list IN ('0','1');

WORKER_TYPE   JOB JOB_STATE        WORKER_ID WORKER_STATU
------------- --- --------------- ---------- ------------
Long Running  Yes SCHEDULED                6 Started
Long Running  Yes SCHEDULED                7 Started

SOLUTION

SQL> show user
USER is "SYSMAN"
SQL> exec mgmt_collection.set_worker_count(0,4);

PL/SQL procedure successfully completed.

SQL> exec mgmt_collection.start_workers();

PL/SQL procedure successfully completed.

SQL> SELECT Decode(task_class_list, 0 , 'Short Running' , 1, 'Long Running ' , 'Unkown') Worker_type,
CASE
WHEN j.job_action IS NULL THEN 'No'
    WHEN j.job_action IS NOT NULL THEN 'Yes'
END AS job_submitted,
    j.state AS job_state,
w.job_id AS worker_id,
    Decode(w.worker_status, 0,'Starting', 1, 'Started', 'Stop Pending') worker_status
FROM dba_scheduler_jobs j, MGMT_collection_workers w
WHERE j.job_action(+) = 'EM_TASK.WORKER(' || w.job_id || ');'
AND w.task_class_list IN ('0','1');  

WORKER_TYPE   JOB JOB_STATE        WORKER_ID WORKER_STATU
------------- --- --------------- ---------- ------------
Short Running Yes SCHEDULED                2 Started
Short Running Yes SCHEDULED                1 Started
Short Running Yes SCHEDULED                3 Started
Short Running Yes SCHEDULED                4 Started
Long Running  Yes SCHEDULED                5 Started
Long Running  Yes SCHEDULED                8 Started

6 rows selected.