由高权限目录引起的OPatch auto补丁失败一例(四)

2015-07-16 12:08:04 · 作者: · 浏览: 8
t来执行opatch脚本。


[root@NCR-Standby-Asm OPatch]# ./opatch auto /upload/gidir/20485808 -ocmrf /u01/unconfig.rsp


Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl ./crs/patch11203.pl -patchdir /upload/gidir -patchn 20485808 -ocmrf /u01/unconfig.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params


This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2015-05-25_15-03-06.log


This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:


/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2015-05-25_15-03-06.report.log


2015-05-25 15:03:06: Starting Oracle Restart Patch Setup


Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params


Stopping RAC /u02/app/oracle/product/11.2.0/dbhome_1 ...


Stopped RAC /u02/app/oracle/product/11.2.0/dbhome_1 successfully


patch /upload/gidir/20485808/20299013? apply successful for home? /u02/app/oracle/product/11.2.0/dbhome_1?


patch /upload/gidir/20485808/20420937/custom/server/20420937? apply successful for home? /u02/app/oracle/product/11.2.0/dbhome_1?


Stopping CRS...


Stopped CRS successfully


Error : The opatch Applicable check failed.? The patch /upload/gidir/20485808/20420937 is not applicable to /u01/app/grid/product/11.2.0/grid


Error:Patch Applicable check failed for /u01/app/grid/product/11.2.0/grid


Starting CRS...


ERROR: Prereq checkApplicable failed. Refer log file for more details.


opatch auto failed.


在补丁过程中出错,过程日志看是在关闭CRS,进行CRS升级过程中出现的错误。


2、问题分析


对于复杂脚本执行过程中出现的问题,对于初学者是很头疼的。其实,如同学生时代综合题,都是由一系列的基础问题构成。对于执行脚本错误问题,执行日志就是贯穿基础问题的线索。


从脚本中,可以定位到主日志的名称位置。/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2015-05-25_15-03-06.log


在其中,逐步进行检查,定位错误发生的位置。


[root@NCR-Standby-Asm ~]# cd /u01/app/grid/product/11.2.0/grid/cfgtoollogs/


[root@NCR-Standby-Asm cfgtoollogs]# ls -l | grep opatchauto


drwxr-xr-x 3 grid oinstall? 4096 May 25 15:03 opatchauto


-rwxrwx--- 1 grid oinstall 55630 May 25 15:08 opatchauto2015-05-25_15-03-06.log


-rw-r--r-- 1 root root? ? ? 5203 May 25 15:06 opatchauto2015-05-25_15-03-06.report.log


[root@NCR-Standby-Asm cfgtoollogs]# tail -n 100 opatchauto2015-05-25_15-03-06.log


(问题片段展示)


2015-05-25 15:06:42: Running as user grid: /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


2015-05-25 15:06:42: 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/20420937 -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:44: Removing file /tmp/filemKCSmj


2015-05-25 15:06:44: Successfully removed file: /tmp/filemKCSmj


2015-05-25 15:06:44: /bin/su exited with rc=1


2015-05-25 15:06:44: Error : The opatch Applicable check failed.? The patch /upload/gidir/20485808/20420937 is not applicable to /u01/app/grid/product/11.2.0/grid


2015-05-25 15:06:44: Running as user grid: /u01/app/grid/product/11.2.0/grid/OPatch/opatch prereq CheckApplicable -ph /upload/gidir/20485808/20299019 -oh /u01/app/gr