OPatch报错 Prerequisite check "CheckActiveFilesAndExecutables" failed

问题现象:

在使用Opatch打补丁时,报下面的错误:

[[email protected] bin]# <span style="color:#ff0000;">/u01/app/ora11g/product/11.2.0/db_1/OPatch/opatch auto /soft/psu/20299013/ -oh /u01/app/ora11g/product/11.2.0/db_1 -ocmrf /u01/app/ora11g/product/11.2.0/db_1/OPatch/ocm/bin/ocm.rsp</span>
Executing /u01/app/ora11g/product/11.2.0/grid/perl/bin/perl /u01/app/ora11g/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /soft/psu -patchn 20299013 -oh /u01/app/ora11g/product/11.2.0/db_1 -ocmrf /u01/app/ora11g/product/11.2.0/db_1/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/ora11g/product/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/ora11g/product/11.2.0/db_1/cfgtoollogs/opatchauto2015-06-15_15-50-31.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/ora11g/product/11.2.0/db_1/cfgtoollogs/opatchauto2015-06-15_15-50-31.report.log

2015-06-15 15:50:31: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u01/app/ora11g/product/11.2.0/grid/crs/install/crsconfig_params
Enter 'yes' if you have unzipped this patch to an empty directory to proceed  (yes/no):yes
Enter 'yes' if you have unzipped this patch to an empty directory to proceed  (yes/no):yes
The opatch minimum version  check for patch /soft/psu/20299013/17478514 failed  for /u01/app/ora11g/product/11.2.0/db_1
The opatch minimum version  check for patch /soft/psu/20299013/18031668 failed  for /u01/app/ora11g/product/11.2.0/db_1
The opatch minimum version  check for patch /soft/psu/20299013/18522509 failed  for /u01/app/ora11g/product/11.2.0/db_1
The opatch minimum version  check for patch /soft/psu/20299013/19121551 failed  for /u01/app/ora11g/product/11.2.0/db_1
The opatch minimum version  check for patch /soft/psu/20299013/19769489 failed  for /u01/app/ora11g/product/11.2.0/db_1
The opatch minimum version  check for patch /soft/psu/20299013/20299013 failed  for /u01/app/ora11g/product/11.2.0/db_1
Opatch version check failed for oracle home  /u01/app/ora11g/product/11.2.0/db_1
Opatch version  check failed
ERROR: update the opatch version for the failed homes and retry

opatch auto failed.

表面上看像是OPatch版本太低的问题,其实我的OPatch已经是最高版本了!这个报错表面看很有误导性,我接着更一进一步的看日志!

查看OPatch日志:

[2015-6-15 16:26:29]         Following executables are active :
                             /u01/app/ora11g/product/11.2.0/db_1/lib/libclntsh.so.11.1
[2015-6-15 16:26:29]         Prerequisite check "CheckActiveFilesAndExecutables" failed.
                             The details are:

                             Following executables are active :
                             /u01/app/ora11g/product/11.2.0/db_1/lib/libclntsh.so.11.1
[2015-6-15 16:26:29]         Start fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/bin/proc at Mon Jun 15 16:26:29 CST
 2015
[2015-6-15 16:26:29]         Finish fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/bin/proc at Mon Jun 15 16:26:29 CS
T 2015
[2015-6-15 16:26:29]         Start fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/lib/liborasdkbase.so.11.1 at Mon Ju
n 15 16:26:29 CST 2015
[2015-6-15 16:26:29]         Finish fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/lib/liborasdkbase.so.11.1 at Mon J
un 15 16:26:29 CST 2015
[2015-6-15 16:26:29]         Start fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/bin/wrap at Mon Jun 15 16:26:29 CST
 2015
[2015-6-15 16:26:29]         Finish fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/bin/wrap at Mon Jun 15 16:26:29 CS
T 2015
[2015-6-15 16:26:29]         Start fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/bin/e2eme at Mon Jun 15 16:26:29 CS
T 2015
[2015-6-15 16:26:29]         Finish fuser command /sbin/fuser /u01/app/ora11g/product/11.2.0/db_1/bin/e2eme at Mon Jun 15 16:26:29 C
ST 2015
[2015-6-15 16:26:29]         OUI-67073:UtilSession 失败: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[2015-6-15 16:26:29]         Finishing UtilSession at Mon Jun 15 16:26:29 CST 2015
[2015-6-15 16:26:29]         Log file location: /u01/app/ora11g/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-06-15_16-26-24下午
_1.log
[2015-6-15 16:26:29]         堆栈说明: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[2015-6-15 16:26:29]         堆栈跟踪: oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:5717)
[2015-6-15 16:26:29]         堆栈跟踪: oracle.opatch.opatchutil.NApply.process(NApply.java:697)
[2015-6-15 16:26:29]         堆栈跟踪: oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1082)
[2015-6-15 16:26:29]         堆栈跟踪: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2015-6-15 16:26:29]         堆栈跟踪: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2015-6-15 16:26:29]         堆栈跟踪: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2015-6-15 16:26:29]         堆栈跟踪: java.lang.reflect.Method.invoke(Method.java:592)
[2015-6-15 16:26:29]         堆栈跟踪: oracle.opatch.UtilSession.process(UtilSession.java:317)
[2015-6-15 16:26:29]         堆栈跟踪: oracle.opatch.OPatchSession.main(OPatchSession.java:2575)
[2015-6-15 16:26:29]         堆栈跟踪: oracle.opatch.OPatch.main(OPatch.java:626)

可以看到主要问题是“OUI-67073:UtilSession 失败: Prerequisite check "CheckActiveFilesAndExecutables" failed.”

看上去应该是有活动的文件进程导致打patch不能进行

具体参考Metalink:148501.1

解决办法:

1.停止数据库和监听

2.kill掉所有与oracle相关的进程

[[email protected] OPatch]$ ps -ef|grep smon
oracle   31593 20962  0 16:32 pts/2    00:00:00 grep smon
[[email protected] OPatch]$ ps -ef|grep ora
root      8418  8393  0 10:57 pts/1    00:00:00 su - oracle
oracle    8419  8418  0 10:57 pts/1    00:00:00 -bash
root     20961 28684  0 15:52 pts/2    00:00:00 su - oracle
oracle   20962 20961  0 15:52 pts/2    00:00:00 -bash
oracle   21978     1  0 13:52 pts/1    00:00:01 /u01/app/ora11g/product/11.2.0/db_1/perl/bin/perl /u01/app/ora11g/product/11.2.0/db_1/bin/emwd.pl dbconsole /u01/app/ora11g/product/11.2.0/db_1/customer_custdb/sysman/log/emdb.nohup
oracle   22059 21978  0 13:52 pts/1    00:00:23 /u01/app/ora11g/product/11.2.0/db_1/bin/emagent
oracle   25437     1  0 14:43 ?        00:00:17 /u01/app/ora11g/product/11.2.0/grid/bin/ohasd.bin reboot
oracle   26757 21978  0 14:50 pts/1    00:00:56 /u01/app/ora11g/product/11.2.0/db_1/jdk/bin/java -server -Xmx384M -XX:MaxPermSize=400M -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/u01/app/ora11g/product/11.2.0/db_1 -Doracle.home=/u01/app/ora11g/product/11.2.0/db_1/oc4j -Doracle.oc4j.localhome=/u01/app/ora11g/product/11.2.0/db_1/customer_custdb/sysman -DEMSTATE=/u01/app/ora11g/product/11.2.0/db_1/customer_custdb -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/u01/app/ora11g/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_customer_custdb/config/jazn.xml -Djava.security.policy=/u01/app/ora11g/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_customer_custdb/config/java2.policy -Djavax.net.ssl.KeyStore=/u01/app/ora11g/product/11.2.0/db_1/sysman/config/OCMTrustedCerts.txt-Djava.security.properties=/u01/app/ora11g/product/11.2.0/db_1/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/u01/app/ora11g/product/11.2.0/db_1/customer_custdb -Dsysman.md5password=true -Drepapi.oracle.home=/u01/app/ora11g/product/11.2.0/db_1 -Ddisable.checkForUpdate=true -Doracle.sysman.ccr.ocmSDK.websvc.keystore=/u01/app/ora11g/product/11.2.0/db_1/jlib/emocmclnt.ks -Dice.pilots.html4.ignoreNonGenericFonts=true -Djava.awt.headless=true -jar /u01/app/ora11g/product/11.2.0/db_1/oc4j/j2ee/home/oc4j.jar -config /u01/app/ora11g/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_customer_custdb/config/server.xml
root     30019 27092  0 16:20 pts/0    00:00:00 su - oracle
oracle   30020 30019  0 16:20 pts/0    00:00:00 -bash
oracle   31594 20962  1 16:32 pts/2    00:00:00 ps -ef
oracle   31595 20962  0 16:32 pts/2    00:00:00 grep ora

--kill进程
[[email protected] OPatch]$ kill -9 21978
[[email protected] OPatch]$ kill -9 26757
[[email protected] OPatch]$ kill -9 22059
[[email protected] OPatch]$ kill -9 25437

[[email protected] OPatch]$ ps -ef|grep ora
root      8418  8393  0 10:57 pts/1    00:00:00 su - oracle
oracle    8419  8418  0 10:57 pts/1    00:00:00 -bash
root     20961 28684  0 15:52 pts/2    00:00:00 su - oracle
oracle   20962 20961  0 15:52 pts/2    00:00:00 -bash
root     30019 27092  0 16:20 pts/0    00:00:00 su - oracle
oracle   30020 30019  0 16:20 pts/0    00:00:00 -bash
oracle   32038     1  1 16:34 ?        00:00:00 /u01/app/ora11g/product/11.2.0/grid/bin/ohasd.bin restart
oracle   32132 20962  1 16:35 pts/2    00:00:00 ps -ef
oracle   32133 20962  0 16:35 pts/2    00:00:00 grep ora

再次进行OPatch命令正常!

时间: 2024-08-28 20:33:34

OPatch报错 Prerequisite check "CheckActiveFilesAndExecutables" failed的相关文章

Oracle打Patch报错Prerequisite check &quot;CheckActiveFilesAndExecutables&quot; failed.

晚上给几个测试库打补丁,停完监听和实例后查看已经没有Oracle的进程了,于是执行opatch apply.但执行报如下错误: $ opatch apply Oracle Interim Patch Installer version 11.2.0.3.12 Copyright (c) 2017, Oracle Corporation.  All rights reserved. Oracle Home       : /opt/oracle/app/oracle/product/11.2.4/

OPatch报错 Prerequisite check CheckMinimumOPatchVersion failed

Prerequisite check CheckMinimumOPatchVersion failed 问题现象: [[email protected] 18522509]$ /DBSoft/Product/11.2.4/db_1/OPatch/opatch apply Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved. Ora

安装MySQL-python报错error: command &#39;gcc&#39; failed with exit status 1

[[email protected] MySQL-python-1.2.3]# python setup.py install function) .... _mysql.c:133: error: 'ER_SYNTAX_ERROR' undeclared (first use in this function) _mysql.c:380: error: '_mysql_ConnectionObject' has no member named 'connection' _mysql.c:382

php curl报错:417 - Expectation Failed

当我在post提交的数据增加一段内容后会报错:417 - Expectation Failed. 查资料发现在使用curl做POST时,当post的数据大于1024字节时,curl并不会直接发起post请求,而是分为两步, 1.发送一个请求,包含一个Exc:100-continue,询问Server接收数据 2.接收到Server返回100-continue应答后,才把post提交给Server RFC相关资料:https://www.w3.org/Protocols/rfc2616/rfc26

SSAS 发布报错处理方法 Login failed for user &#39;NT Service\MSSQLServerOLAPService&#39; 28000

Create login and grant access: Open up SQL Server Management Studio [login to the database engine]> Security > Login (Right click) > New Login >add user: "NT Service\MSSQLServerOLAPService">select the database being analyzed in th

安装python模块报错 error: command &#39;gcc&#39; failed with exit status 1

最近在安装paramiko模块的时候,总是报错:error: command 'gcc' failed with exit status 1,一开始比较挠头.找了蛮多资料,说的大多都是说缺少Python-devel 包,然而并不是! 最后蛮费劲的找到了一遍短小但就是正确的博文:http://blog.csdn.net/fenglifeng1987/article/details/38057193 —————————————————————— 解决方法: 安装:yum install gcc li

mysq添加外键报错:check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;TYPE=InnoDB&#39; at line 1

今天用navcat往一个表添加外键的时候报错: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=InnoDB' at line 1 排查之后发现是因为两个表的类型不一样所致: SQL:SHOW TABLE STATUS 查询出数据表的状态,Engine那一列就是 使用

新iPhone6做真机测试报错:process launch failed: Security

前言 同事新买的iPhone6,需要Xcode直接安装最新版本,在安装之前,曾通过fir.im装过Ad_Hoc版.在使用Xcode进行真机运行时,iPhone6无法启动应用,并报错:process launch failed: Security. 解决办法 点击iPhone6之前安装的应用版本,这时候会弹框让用户确认是否信任开发者的应用,点击信任,然后重新使用Xcode进行安装即可~

python安装模块的时候报错error: command &#39;gcc&#39; failed with exit status 1

[情况] 在写Python代码的时候,需要用到psutil模块,需要安装. 但是在安装时,报错:error: command 'gcc' failed with exit status 1 [解决步骤] 按照经验,觉得应该是缺少了gcc模块, 所以操作 [ yum install -y gcc ] 安装完成后,再继续安装psutil还是报同样的错,发现报错不是  not found gcc,可能是某个功能模块缺失 发现需要安装多一些依赖的包:  [ yum install -y libffi-d