安装失败后,查看日志提示以下错误: Stopping CRS... Stopped CRS successfully patch /oracle/soft/28813878/28729234 apply successful for home /oracle/app/11.2.0.4/grid patch /oracle/soft/28813878/28729262 apply failed for home /oracle/app/11.2.0.4/grid Starting CRS... Installing Trace File Analyzer CRS-4123: Oracle High Availability Services has been started. opatch auto succeeded. 分析安装日志,提示 PRE 安装失败,详细日志如下所示: +829 You must apply the patch with the install user +830 Command invocation returned Error... '', Return Code = 1 +831 Execution of PRE script failed, with return value = 1 +832 +833 Do you want to proceed? [y|n] +834 N (auto-answered by -silent) +835 User Responded with: N +836 ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 1' +837 +838 Restoring "/oracle/app/11.2.0.4/grid" to the state prior to running NApply... +839 Checking if OPatch needs to invoke 'make' to restore some binaries... +840 OPatch was able to restore your system. Look at log file and timestamp of each file to make sure your system is i n the state prior to applying the patch. …… [May 30, 2019 8:54:44 AM] [SEVERE] OUI-67073:UtilSession failed: ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 1' [May 30, 2019 8:54:44 AM] [INFO] -------------------------------------------------------------------------------- [May 30, 2019 8:54:44 AM] [INFO] The following warnings have occurred during OPatch execution: [May 30, 2019 8:54:44 AM] [INFO] 1) OUI-67133:Execution of PRE script failed, with return value = 1 [May 30, 2019 8:54:44 AM] [INFO] 2) OUI-67124:ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 1' [May 30, 2019 8:54:44 AM] [INFO] 3) OUI-67124: NApply restored the home. Please check your ORACLE_HOME to make sure: - files are restored properly. - binaries are re-linked correctly. (use restore.[sh,bat] and make.txt (Unix only) as a reference. They are located under "/oracle/app/11.2.0.4/grid/.patch_storage/NApply/2019-05-30_08-48-06AM" 根据错误提示,显示该内容需要软件安装用户进行,猜测应该涉及用户相关问题,通过查询MOS信息获取到该问题在2018年10月GI PSU上,由于报错相关信息跟MOS是否吻合,同时使用root用户验证$USER信息和MOS一致,采取MOS提供解决方式尝试重新安装,安装成功。 [oracle@icdb1:/]#su grid -c "echo $USER" root 根据MOS提示在安装补丁之前配置用户环境变量 # export USER=<GRID/DATABASE_SOFTWARE_OWNER> # echo $USER # <GRID_HOME>/OPatch/opatch auto <UNZIPPED_PATCH_LOCATION>/28813878 在安装grid和Oracle补丁时需使用不同的USER进行安装,否则容易引起补丁安装失败。该问题已在AIX 71和AIX 72上出现。 MOS 参考文档: opatch auto Fails to Apply DBPSU With Error OUI-67133:Execution of PRE script failed and OUI-67124:ApplySession failed in system modification phase ( 文档 ID 2468874.1)
opatch auto Fails to Apply DBPSU With Error OUI-67133:Execution of PRE script failed and OUI-67124:ApplySession failed in system modification phase (Doc ID 2468874.1)
In this Document Symptoms Changes Cause Solution References APPLIES TO: Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2] Information in this document applies to any platform. SYMPTOMS While applying October 2018 DBPSU (patch # 28204707) using "opatch auto", the execution fails with the following error: ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 1' ... OPatch failed with error code 73 When invoking "opatch auto" to apply October 2018 PSU as root user, one may hit the above error. The below messages will be logged in the <ORACLE_HOME>/cfgtoollogs/opatch/opatch<TIMESTAMP>.log: [Oct 24, 2018 6:10:41 PM] [INFO] Start the Apply preScript at Wed Oct 24 18:10:41 GMT 2018 [Oct 24, 2018 6:10:41 PM] [INFO] Execution of 'sh /refresh/asmsupt/home/28429134/28204707/28204707/custom/scripts/pre -apply 28204707 ': [Oct 24, 2018 6:10:41 PM] [INFO] Return Code = 1 [Oct 24, 2018 6:10:41 PM] [INFO] Execution of ' Command and arguments of pre/post scripts is restricted to be viewed in log file ': You must apply the patch with the install user Return Code = 1 [Oct 24, 2018 6:10:41 PM] [INFO] Command invocation returned Error... '', Return Code = 1 [Oct 24, 2018 6:10:41 PM] [INFO] Finish the Apply preScript at Wed Oct 24 18:10:41 GMT 2018 [Oct 24, 2018 6:10:41 PM] [WARNING] OUI-67133:Execution of PRE script failed, with return value = 1 [Oct 24, 2018 6:10:41 PM] [INFO] Do you want to proceed? [y|n] [Oct 24, 2018 6:10:41 PM] [INFO] N (auto-answered by -silent) [Oct 24, 2018 6:10:41 PM] [INFO] User Responded with: N [Oct 24, 2018 6:10:41 PM] [WARNING] OUI-67124:ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 1' [Oct 24, 2018 6:10:41 PM] [INFO] Restoring "/refresh/asmsupt/app/oracle/product/rdbms" to the state prior to running NApply... To verify the issue, run the below command. If it returns "root" the workaround can be followed: As root user, # su <GRID/DATABASE_SOFTWARE_OWNER> -c "echo $USER" For example, # su oracle -c "echo $USER" root CHANGES Applying October 2018 PSU as root user by using "opatch auto" command CAUSE "opatch auto" invokes the apply scripts as "su <db-user> -c <opatch-napply-cmd-line>", but because the user that issues "opatch auto" is root, issuing su to run the "pre" script does not change the login user. Querying $USER by issuing 'su <db-user> -c "echo $USER" ' still returns root as the user. This problem affects a small subset of customers and does not impact all customers, but Oracle suggests all customers use the workaround provided in the Solution section to avoid running into the problem. SOLUTION 1. Before invoking opatch auto as root user, set the USER environment variable to the software owner of the GRID or database home: # export USER=<GRID/DATABASE_SOFTWARE_OWNER> # echo $USER # <GRID_HOME>/OPatch/opatch auto <UNZIPPED_PATCH_LOCATION>/28429134 2. If this is an environment with job role separation, where ASM /database were installed as different OS users, one can apply the patches using opatch auto after specifying any one of the software homes: For example, # export USER=grid # <GRID_HOME>/OPatch/opatch auto <UNZIPPED_PATCH_LOCATION>/28429134 -oh <GRID_HOME> # export USER=oracle # <RDBMS_HOME>/OPatch/opatch auto <UNZIPPED_PATCH_LOCATION>/28429134 -oh <RDBMS_HOME> IMPORTANT This issue happens only on Oct-2018 GIPSU.