首页 > 技术文章 > opatchauto failed with error code 42 补丁目录权限问题

wwjd365 2018-09-20 12:27 原文

[root@WWJD1 ~]# opatchauto apply $UNZIPPED_PATCH_LOCATION/28183653

OPatchauto session is initiated at Thu Sep 20 11:21:51 2018

System initialization log file is /oracle/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2018-09-20_11-21-53AM.log.


Session log file is /oracle/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2018-09-20_11-23-17AM.log
The id for this session is NGPY

Executing OPatch prereq operations to verify patch applicability on home /oracle/app/12.2.0/grid

Executing OPatch prereq operations to verify patch applicability on home /oracle/app/oracle/product/12.2.0/db_1
Patch applicability verified successfully on home /oracle/app/oracle/product/12.2.0/db_1

Patch applicability verified successfully on home /oracle/app/12.2.0/grid


Verifying SQL patch applicability on home /oracle/app/oracle/product/12.2.0/db_1

SQL patch applicability verified successfully on home /oracle/app/oracle/product/12.2.0/db_1


Preparing to bring down database service on home /oracle/app/oracle/product/12.2.0/db_1
Successfully prepared home /oracle/app/oracle/product/12.2.0/db_1 to bring down database service


Bringing down CRS service on home /oracle/app/12.2.0/grid


Prepatch operation log file location: /oracle/app/grid/crsdata/WWJD1/crsconfig/crspatch_WWJD1_2018-09-20_11-24-05AM.log
CRS service brought down successfully on home /oracle/app/12.2.0/grid


Performing prepatch operation on home /oracle/app/oracle/product/12.2.0/db_1
Perpatch operation completed successfully on home /oracle/app/oracle/product/12.2.0/db_1


Start applying binary patch on home /oracle/app/oracle/product/12.2.0/db_1

 

Binary patch applied successfully on home /oracle/app/oracle/product/12.2.0/db_1


Performing postpatch operation on home /oracle/app/oracle/product/12.2.0/db_1
Postpatch operation completed successfully on home /oracle/app/oracle/product/12.2.0/db_1


Start applying binary patch on home /oracle/app/12.2.0/grid


Failed while applying binary patches on home /oracle/app/12.2.0/grid

Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : WWJD1->/oracle/app/12.2.0/grid Type[crs]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /oracle/app/12.2.0/grid, host: WWJD1.
Command failed: /oracle/app/12.2.0/grid/OPatch/opatchauto apply /oracle/soft/patch/28317269/28183653 -oh /oracle/app/12.2.0/grid -target_type cluster -binary -invPtrLoc /oracle/app/12.2.0/grid/oraInst.loc -jre /oracle/app/12.2.0/grid/OPatch/jre -persistresult /oracle/app/12.2.0/grid/OPatch/auto/dbsessioninfo/sessionresult_WWJD1_crs.ser -analyzedresult /oracle/app/12.2.0/grid/OPatch/auto/dbsessioninfo/sessionresult_analyze_WWJD1_crs.ser
Command failure output:
==Following patches FAILED in apply:

Patch: /oracle/soft/patch/28317269/28183653/28163190
Log: /oracle/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-20_11-29-24AM_1.log
Reason: Failed during Analysis: CheckPatchApplicable Failed, [ Prerequisite Status: FAILED, Prerequisite output:
The details are:

Patch 28163190:
Copy Action: Source File "/oracle/soft/patch/28317269/28183653/28163190/files/bin/ocrcheck.bin" does not exists or is not readable
'oracle.has.crs, 12.2.0.1.0': Cannot copy file from 'ocrcheck.bin' to '/oracle/app/12.2.0/grid/bin/ocrcheck.bin'
Copy Action: Source File "/oracle/soft/patch/28317269/28183653/28163190/files/bin/ocrconfig.bin" does not exists or ...

After fixing the cause of failure Run opatchauto resume

]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.

OPatchauto session completed at Thu Sep 20 11:31:37 2018
Time taken to complete the session 9 minutes, 46 seconds

opatchauto failed with error code 42

--怀疑是补丁目录权限的问题

[root@WWJD1 ~]# opatchauto apply $UNZIPPED_PATCH_LOCATION/28183653

OPatchauto session is initiated at Thu Sep 20 11:52:05 2018

System initialization log file is /oracle/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2018-09-20_11-52-08AM.log.

Clusterware is either not running or not configured. You have the following 2 options:
1. Configure and start the Clusterware on this node and re-run the tool
2. Run the tool with '-oh <GI_HOME>' to first patch the Grid Home, then invoke tool with '-database <oracle database name>' or '-oh <RAC_HOME>' to patch the RAC home

OPATCHAUTO-72029: CLusterware home not configured.
OPATCHAUTO-72029: Clusterware is either not running or not configured or cluster is software only GI
OPATCHAUTO-72029: If only Grid Infrastructure software is installed, please run opatchauto with '-oh' option . Alternatively configure and start the Clusterware before running opatchauto.

 

OPatchauto session completed at Thu Sep 20 11:52:10 2018
Time taken to complete the session 0 minute, 5 seconds

Topology creation failed.

[root@WWJD1 ~]# /oracle/app/12.2.0/grid/bin/crsctl start crs
CRS-6706: Oracle Clusterware Release patch level ('981856784') does not match Software patch level ('0'). Oracle Clusterware cannot be started.
CRS-4000: Command Start failed, or completed with errors.
[root@WWJD1 ~]#

--备份的软件回退
--补丁文件的权限给777,省的不必要的报错麻烦
chmod 777 -R /oracle/soft/patch

再次打补丁就正常了

推荐阅读