2015-05-25 15:06:44: s_run_as_user2: Running /bin/su grid -c ' /u01/app/grid/product/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /upload/gidir/20485808/20299019 -oh /u01/app/grid/product/11.2.0/grid -customLogDir /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto/core '
2015-05-25 15:06:46: Removing file /tmp/filepuKZDC
2015-05-25 15:06:46: Successfully removed file: /tmp/filepuKZDC
2015-05-25 15:06:46: /bin/su successfully executed
2015-05-25 15:06:46: Status of Applicable? check? for /u01/app/grid/product/11.2.0/grid is 1
2015-05-25 15:06:46: Error:Patch Applicable check failed for /u01/app/grid/product/11.2.0/grid
2015-05-25 15:06:46: Executing cmd: /bin/rpm -q sles-release
2015-05-25 15:06:47: Command output:
>? package sles-release is not installed
从片段中,我们发现两个线索:首先,虽然是root执行脚本,但是在过程中出现了一个“Running as user gird”提示。说明在执行脚本Check的时候,脚本实现了从root切换到gird的动作。另一个是报错的主因:是进行Check的时候。
那么,从重现问题的角度看。可以手工模拟一下出现问题:
[grid@NCR-Standby-Asm ~]$ /u01/app/grid/product/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /upload/gidir/20485808/20420937 -oh /u01/app/grid/product/11.2.0/grid -customLogDir /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto/core
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation.? All rights reserved.
PREREQ session
Oracle Home? ? ? : /u01/app/grid/product/11.2.0/grid
Central Inventory : /u01/app/oraInventory
? from? ? ? ? ? : /u01/app/grid/product/11.2.0/grid/oraInst.loc
OPatch version? ? : 11.2.0.3.10
OUI version? ? ? : 11.2.0.4.0
Log file location : /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2015-05-25_15-17-39PM_1.log
Invoking prereq "checkapplicable"
ZOP-46: The patch(es) are not applicable on the Oracle Home because some patch actions are not applicable. All required components, however, are installed.
Prereq "checkApplicable" for patch 20420937 failed.
The details are:
Patch 20420937:
Copy Action: Source File "/upload/gidir/20485808/20420937/files/bin/appvipcfg.pl" does not exists or is not readable
'oracle.crs, 11.2.0.4.0': Cannot copy file from 'appvipcfg.pl' to '/u01/app/grid/product/11.2.0/grid/bin/appvipcfg.pl'
Copy Action: Source File "/upload/gidir/20485808/20420937/files/bin/oclumon.bin" does not exists or is not readable
'oracle.crs, 11.2.0.4.0': Cannot copy file from 'oclumon.bin' to '/u01/app/grid/product/11.2.0/grid/bin/oclumon.bin'
Copy Action: Source File "/upload/gidir/20485808/20420937/files/bin/ologgerd" does not exists or is not readable
'oracle.crs, 11.2.0.4.0': Cannot copy file from 'ologgerd' to '/u01/app/grid/product/11.2.0/grid/bin/ologgerd'
Copy Action: Source File "/upload/gidir/20485808/20420937/files/bin/osysmond.bin" does not exists or is not readable
'oracle.crs, 11.2.0.4.0': Cannot copy file from 'osysmond.bin' to '/u01/app/grid/product/11.2.0/grid/bin/osysmond.bin'
Copy Action: Source File "/upload/gidir/20485808/20420937/files/crs/demo/coldfailover/act_db.pl" does not exists or is not readable
'oracle.crs, 11.2.0.4.0': Cannot copy file from 'act_db.pl' to '/u01/app/grid/product/11.2.0/grid/crs/demo/coldfailover/act_db.pl'
Copy Action: Source File "/upload/gidir/20485808/20420937/files/crs/