Error while applying java patch on GRID HOME
Issue: Error Received while applying Oracle java patch on GRID HOME.
In this post we will see how to resolve the error we got while applying Oracle java patch.
Summary Error Message: OPatch failed with error code 73
Details:
GRID_HOME: /u00/grid/oracle/product/19c/grid
Complete Error
Error:
Patching component oracle.jdk, 1.8.0.201.0…
ApplySession failed in system modification phase… ‘ApplySession::apply failed:
mv: cannot move ‘/u00/grid/oracle/product/19c/grid/lib/libasmclntsh19.so’
to ‘/u00/grid/oracle/product/19c/grid/lib/libasmclntsh19.so.bak’: Permission denied
make: *** [update_patchrep] Error 1
‘
Restoring “/u00/grid/oracle/product/19c/grid” to the state prior to running NApply…
OPatch failed to restore the files from backup area. Not running “make”.
NApply was not able to restore the home. Please invoke the following scripts:
– restore.[sh,bat]
– make.txt (Unix only)
to restore the ORACLE_HOME. They are located under
“/u00/grid/oracle/product/19c/grid/.patch_storage/NApply/2023-04-14_08-21-08AM”
UtilSession failed: ApplySession failed in system modification phase… ‘ApplySession::apply failed:
mv: cannot move ‘/u00/grid/oracle/product/19c/grid/lib/libasmclntsh19.so’
to ‘/u00/grid/oracle/product/19c/grid/lib/libasmclntsh19.so.bak’: Permission denied
make: *** [update_patchrep] Error 1
Root cause: File Permission/Ownership issue on jre directory under jdk
Solution:
Step 1) change ownersip of OPatch to grid username. If there is no grid user separately ,use oracle user .
chown -R oracle:oinstall OPatch
Step 2) change ownership of jdk to grid user .If there is no grid user separately ,use oracle user .
chown -R oracle:oinstall jdk
chown -R oracle:oinstall lib
Step 3) Still facing file permissions issue
chmod -R 777 jdk
Now Apply the java patch on GRID HOME