Wednesday, April 22, 2020

Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle"

Hi,

OS : RHEL 7,5 64-bit
Preinstall RPM : OEL 7

I got this error while installing Pre-install RPM . I have shared the steps in this post to fix the same. This fix worked perfectly for me and i never publish a fix unless i tested it.




GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle"

solution:

[root@ranesh yum.repos.d]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

--2020-04-22 18:34:11--  http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7

Resolving public-yum.oracle.com (public-yum.oracle.com)... 104.88.152.222

Connecting to public-yum.oracle.com (public-yum.oracle.com)|104.88.152.222|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1011 [text/plain]

Saving to: ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle’



100%[======================================>] 1,011       --.-K/s   in 0s     



2020-04-22 18:34:13 (67.5 MB/s) - ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle’ saved [1011/1011]

Saturday, April 18, 2020

OPatch failed to locate Central Inventory.


OPatch failed to locate Central Inventory.


[oracle@ranesh OPatch]$ optach lsinventory –all

Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.2.0/dbhome_4
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2.0/dbhome_4/oraInst.loc
OPatch version    : 12.2.0.1.19
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/dbhome_4/cfgtoollogs/opatch/opatch2020-04-19_08-59-07AM_1.log

LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.

OPatch failed with error code 73

Solution:

[oracle@ranesh OPatch]$  cd $ORACLE_HOME/oui/bin

[oracle@ranesh bin]$ ./runInstaller -silent -invPtrLoc "/etc/oraInst.loc" -attachHome ORACLE_HOME="/u01/app/oracle/product/12.2.0/dbhome_4" ORACLE_HOME_NAME="Ora12cHome"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 8987 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
'AttachHome' was successful.

[oracle@ranesh patches]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHwithDetail -ph ./

Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.2.0.1/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version    : 12.2.0.1.19
OUI version       : 12.2.0.1.4Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.2.0/dbhome_4
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2.0/dbhome_4/oraInst.loc
OPatch version    : 12.2.0.1.19
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/dbhome_4/cfgtoollogs/opatch/opatch2020-04-19_09-03-53AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" failed.

The details are:
There is a prereq/overlay cycle exist in being applied patches.
Summary of Conflict Analysis:

There are no patches that can be applied now.


OPatch succeeded.

ROLLBACK----Oracle Database Patch


ROLLBACK


[oracle@ranesh 30886680]$ opatch apply

Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/oracle/product/12.2.0.1/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version    : 12.2.0.1.19
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2020-04-18_15-43-47PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   30886680 

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0.1/db_1')

Is the local system ready for patching? [y|n] y

User Responded with: Y
Backing up files...
Applying interim patch '30886680' to OH '/u01/app/oracle/product/12.2.0.1/db_1'
ApplySession: Optional component(s) [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] , [ oracle.has.crs, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Patching component oracle.rdbms, 12.2.0.1.0...
Patching component oracle.rdbms.util, 12.2.0.1.0...
Patching component oracle.network.rsf, 12.2.0.1.0...
Patching component oracle.ctx, 12.2.0.1.0...
Patching component oracle.ctx.rsf, 12.2.0.1.0...
Patching component oracle.has.common.cvu, 12.2.0.1.0...
Patching component oracle.ldap.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
Patching component oracle.sdo, 12.2.0.1.0...
Patching component oracle.sdo.locator, 12.2.0.1.0...
Patching component oracle.tfa, 12.2.0.1.0...
Patching component oracle.xdk.parser.java, 12.2.0.1.0...
Patching component oracle.rdbms.dv, 12.2.0.1.0...
Patching component oracle.precomp.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.crs, 12.2.0.1.0...
Patching component oracle.rdbms.rman, 12.2.0.1.0...
Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
Patching component oracle.sqlplus, 12.2.0.1.0...
Patching component oracle.ons, 12.2.0.1.0...
Patching component oracle.oraolap, 12.2.0.1.0...
Patching component oracle.xdk.rsf, 12.2.0.1.0...
Patching component oracle.xdk, 12.2.0.1.0...
Patching component oracle.rdbms.lbac, 12.2.0.1.0...
Patching component oracle.sqlplus.ic, 12.2.0.1.0...
Patching component oracle.assistants.server, 12.2.0.1.0...
Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
Patching component oracle.assistants.deconfig, 12.2.0.1.0...
Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
Patching component oracle.ldap.client, 12.2.0.1.0...
Patching component oracle.assistants.acf, 12.2.0.1.0...
Patching component oracle.rdbms.oci, 12.2.0.1.0...
Patching component oracle.install.deinstalltool, 12.2.0.1.0...
Patching component oracle.oracore.rsf, 12.2.0.1.0...
Patching component oracle.precomp.lang, 12.2.0.1.0...
Patching component oracle.precomp.common, 12.2.0.1.0...
Patching component oracle.jdk, 1.8.0.91.0...

OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of `/u01/app/oracle/product/12.2.0.1/db_1/bin/extjobO': Operation not permitted
make: [iextjob] Error 1 (ignored)


Patch 30886680 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2020-04-18_15-43-47PM_1.log

OPatch completed with warnings.




Solution:

-rwsr-x---. 1 root   oinstall   2251869 Apr 15 20:46 extjobO
-rwsr-x---. 1 root   oinstall   2260593 Apr 15 20:46 jssu

Change permission of the above

[root@ranesh ~]# chown -R oracle:oinstall /u01/app/oracle/product/12.2.0.1/db_1

After giving permission

-rwxr-x---. 1 oracle oinstall   2251869 Apr 15 20:46 extjobO
-rwxr-x---. 1 oracle oinstall   2260593 Apr 15 20:46 jssu


Rollback the patch and apply the patch again


[oracle@ranesh 30886680]$ opatch rollback -id 30886680
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.2.0.1/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version    : 12.2.0.1.19
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2020-04-18_16-12-41PM_1.log
Patches will be rolled back in the following order:
   30886680
The following patch(es) will be rolled back: 30886680 

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0.1/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y

Rolling back patch 30886680...

RollbackSession rolling back interim patch '30886680' from OH '/u01/app/oracle/product/12.2.0.1/db_1'
Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Deleting "picstk.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libplp12_pic.a"
Deleting "kolaet.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libgeneric12.a"
Deleting "skgrlib.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libgeneric12.a"
Deleting "kgcs.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libgeneric12.a"
Patching component oracle.rdbms, 12.2.0.1.0...
Patching component oracle.ctx, 12.2.0.1.0...
Patching component oracle.ctx.rsf, 12.2.0.1.0...
Patching component oracle.has.common.cvu, 12.2.0.1.0...
Patching component oracle.ldap.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
Patching component oracle.sdo, 12.2.0.1.0...
Patching component oracle.sdo.locator, 12.2.0.1.0...
Patching component oracle.tfa, 12.2.0.1.0...
Patching component oracle.xdk.parser.java, 12.2.0.1.0...
Patching component oracle.rdbms.dv, 12.2.0.1.0...
Patching component oracle.precomp.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.crs, 12.2.0.1.0...
Patching component oracle.rdbms.rman, 12.2.0.1.0...
Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
Patching component oracle.sqlplus, 12.2.0.1.0...
Patching component oracle.ons, 12.2.0.1.0...
Patching component oracle.oraolap, 12.2.0.1.0...
Patching component oracle.xdk.rsf, 12.2.0.1.0...
Deleting "jznmerge.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libxml12.a"
Deleting "jznprint.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libxml12.a"
Deleting "jznindex.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libxml12.a"
Deleting "jznevq.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libxml12.a"
Deleting "jzncsv.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libxml12.a"
Patching component oracle.xdk, 12.2.0.1.0...
Patching component oracle.rdbms.lbac, 12.2.0.1.0...

Patching component oracle.sqlplus.ic, 12.2.0.1.0...
Patching component oracle.assistants.server, 12.2.0.1.0...
Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
Patching component oracle.assistants.deconfig, 12.2.0.1.0...
Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
Patching component oracle.ldap.client, 12.2.0.1.0...
Patching component oracle.assistants.acf, 12.2.0.1.0...
Patching component oracle.rdbms.oci, 12.2.0.1.0...
Patching component oracle.install.deinstalltool, 12.2.0.1.0...
Patching component oracle.oracore.rsf, 12.2.0.1.0...
Deleting "slmeset.o" from archive "/u01/app/oracle/product/12.2.0.1/db_1/lib/libcore12.a"

Patching component oracle.precomp.lang, 12.2.0.1.0...
Patching component oracle.precomp.common, 12.2.0.1.0...
Patching component oracle.jdk, 1.8.0.91.0...
RollbackSession removing interim patch '30886680' from inventory
Log file location: /u01/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2020-04-18_16-12-41PM_1.log

OPatch succeeded.


[oracle@ranesh 30886680]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.2.0.1/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version    : 12.2.0.1.19
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2020-04-18_16-20-57PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   30886680 

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.2.0.1/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30886680' to OH '/u01/app/oracle/product/12.2.0.1/db_1'
ApplySession: Optional component(s) [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] , [ oracle.has.crs, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Patching component oracle.rdbms, 12.2.0.1.0...
Patching component oracle.rdbms.util, 12.2.0.1.0...
Patching component oracle.network.rsf, 12.2.0.1.0...
Patching component oracle.ctx, 12.2.0.1.0...
Patching component oracle.ctx.rsf, 12.2.0.1.0...
Patching component oracle.has.common.cvu, 12.2.0.1.0...
Patching component oracle.ldap.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
Patching component oracle.sdo, 12.2.0.1.0...
Patching component oracle.sdo.locator, 12.2.0.1.0...
Patching component oracle.tfa, 12.2.0.1.0...
Patching component oracle.tfa, 12.2.0.1.0...
Patching component oracle.xdk.parser.java, 12.2.0.1.0...
Patching component oracle.rdbms.dv, 12.2.0.1.0...
Patching component oracle.precomp.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.crs, 12.2.0.1.0...
Patching component oracle.rdbms.rman, 12.2.0.1.0...
Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
Patching component oracle.sqlplus, 12.2.0.1.0...
Patching component oracle.ons, 12.2.0.1.0...
Patching component oracle.oraolap, 12.2.0.1.0...
Patching component oracle.xdk.rsf, 12.2.0.1.0...
Patching component oracle.xdk, 12.2.0.1.0...
Patching component oracle.rdbms.lbac, 12.2.0.1.0...
Patching component oracle.sqlplus.ic, 12.2.0.1.0...
Patching component oracle.assistants.server, 12.2.0.1.0...
Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
Patching component oracle.assistants.deconfig, 12.2.0.1.0...
Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
Patching component oracle.ldap.client, 12.2.0.1.0...
Patching component oracle.assistants.acf, 12.2.0.1.0...
Patching component oracle.rdbms.oci, 12.2.0.1.0...
Patching component oracle.install.deinstalltool, 12.2.0.1.0...
Patching component oracle.oracore.rsf, 12.2.0.1.0...
Patching component oracle.precomp.lang, 12.2.0.1.0...
Patching component oracle.precomp.common, 12.2.0.1.0...
Patching component oracle.jdk, 1.8.0.91.0...
Patching component oracle.ldap.client, 12.2.0.1.0...
Patching component oracle.assistants.acf, 12.2.0.1.0...
Patching component oracle.rdbms.oci, 12.2.0.1.0...
Patching component oracle.install.deinstalltool, 12.2.0.1.0...
Patching component oracle.oracore.rsf, 12.2.0.1.0...
Patching component oracle.precomp.lang, 12.2.0.1.0...
Patching component oracle.precomp.common, 12.2.0.1.0...
Patching component oracle.jdk, 1.8.0.91.0...
Patch 30886680 successfully applied.
Log file location: /u01/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2020-04-18_16-20-57PM_1.log

OPatch succeeded.


Table import and export.

Create Data Pump Directory. The first step in Oracle Data Pump is to create an OS level directory which will be used by Oracle for perform...