ORACLE 19C RAC FOR RHEL7 打補丁報錯OPatchException: Unable to create patchObject

清風艾艾發表於2020-06-30

    6月15號,在做oracle 19c for rhel7.6安裝及打補丁時,遭遇了Unable to create patchObject和oui-patch.xml 

(許可權不夠)報錯。這裡記錄一下問題分析處理過程,備忘!

    叢集環境的基本資訊:

    1、兩節點的rac

    2、作業系統版本rhel7.6

    3、資料庫版本19.3.0

    4、應用補丁包p30899722_190000_Linux-x86-64.zip 

    問題場景:

    p30899722_190000_Linux-x86-64.zip 在兩個節點的GI應用成功,在第一節點的DB應用成功,第二節點出現報錯。

    報錯資訊如下:

[root@myrac2 ~]# /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1/

OPatchauto session is initiated at Tue Jun 15 13:26:41 2020

System initialization log file is /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchautodb/systemconfig2020-06-15_01-26-47PM.log.

會話日誌檔案是/u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/opatchauto2020-06-15_01-27-03PM.log

此會話的 ID 為 WLFG

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0/db_1

Patch applicability verification failed on home /u01/app/oracle/product/19.0/db_1

未能執行 [OPatchAutoBinaryAction] 補丁程式操作, 有關詳細資訊, 請檢視日誌。故障:

Patch Target : myrac2->/u01/app/oracle/product/19.0/db_1 型別 [rac]

Details: [

---------------------------Patching Failed---------------------------------

Command execution failed during patching in home: /u01/app/oracle/product/19.0/db_1, host: myrac2.

Command failed:  /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto  apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1 -target_type rac_database -binary -invPtrLoc /u01/app/oracle/product/19.0/db_1//oraInst.loc -jre /u01/app/oracle/product/19.0/db_1/OPatch/jre -persistresult /u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_myrac2_rac_2.ser -analyze -online -prepare_home

Command failure output: 

==Following patches FAILED in analysis for apply:

Patch: /u01/soft/psu/30899722/30894985

Log: 

Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk. OPatchException: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/30869156 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/actions" or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/inventory" does not exist.

Patch: /u01/soft/psu/30899722/30869156

Log: 

Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/30869156 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/actions" or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/inventory" does not exist. 

After fixing the cause of failure Run opatchauto resume

]

OPATCHAUTO-68061: 業務流程引擎失敗。

OPATCHAUTO-68061: 業務流程引擎失敗, 返回程式碼為 1

OPATCHAUTO-68061: 有關詳細資料, 請檢視日誌。

OPatchAuto 失敗。

OPatchauto session completed at Tue Jun 15 13:27:17 2020

Time taken to complete the session 0 minute, 37 seconds

 opatchauto failed with error code 42

[root@myrac2 ~]#

    此時,回滾該補丁包會失敗,報錯依然是config必要檔案缺失。

[root@myrac2 psu]# /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto rollback /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1/

OPatchauto session is initiated at Tue Jun 15 13:40:42 2020

System initialization log file is /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchautodb/systemconfig2020-06-15_01-40-44PM.log.

會話日誌檔案是/u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/opatchauto2020-06-15_01-40-55PM.log

此會話的 ID 為 SDAD

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0/db_1

Patch applicability verification failed on home /u01/app/oracle/product/19.0/db_1

未能執行 [OPatchAutoBinaryAction] 補丁程式操作, 有關詳細資訊, 請檢視日誌。故障:

Patch Target : myrac2->/u01/app/oracle/product/19.0/db_1 型別 [rac]

Details: [

---------------------------Patching Failed---------------------------------

Command execution failed during patching in home: /u01/app/oracle/product/19.0/db_1, host: myrac2.

Command failed:  /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto  rollback /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1 -target_type rac_database -binary -invPtrLoc /u01/app/oracle/product/19.0/db_1//oraInst.loc -jre /u01/app/oracle/product/19.0/db_1/OPatch/jre -persistresult /u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_myrac2_rac_2.ser -analyze -online -prepare_home

Command failure output: 

==Following patches FAILED in analysis for rollback:

Patch: /u01/soft/psu/30899722/30894985

Log: 

Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk. OPatchException: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/30869156 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/actions" or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/inventory" does not exist.

Patch: /u01/soft/psu/30899722/30869156

Log: 

Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/30869156 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/actions" or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/inventory" does not exist. 

After fixing the cause of failure Run opatchauto resume

]

OPATCHAUTO-68061: 業務流程引擎失敗。

OPATCHAUTO-68061: 業務流程引擎失敗, 返回程式碼為 1

OPATCHAUTO-68061: 有關詳細資料, 請檢視日誌。

OPatchAuto 失敗。

OPatchauto session completed at Tue Jun 15 13:41:09 2020

Time taken to complete the session 0 minute, 27 seconds

 opatchauto failed with error code 42

[root@myrac2 psu]#

    根據提示,檢視/u01/app/oracle/product/19.0/db_1/inventory/oneoffs目錄下相關檔案確實有缺失。

[root@myrac2 psu]# cd /u01/app/oracle/product/19.0/db_1/inventory/oneoffs

[root@myrac2 oneoffs]# ls

29517242  29585399

[root@myrac2 oneoffs]# 

    因為第一節點的DB_HOME成功應用了補丁,檢視一節點的補丁相關檔案是存在的。

[oracle@myrac1 ~]$ cd /u01/app/oracle/product/19.3.0/db_1/inventory/19.0

[oracle@myrac1 19.0]$ ls

29517242  29585399  30869156  30894985

[oracle@myrac1 19.0]$

    嘗試將一節點 /u01/app/oracle/product/19.3.0/db_1/inventory/19.0下的30869156  30894985傳輸二節點。

[oracle@myrac1 19.0]$ scp -r 30869156 myrac2:/u01/app/oracle/product/19.3.0/db_1/inventory/19.0/

inventory.xml                                                                                                                                                  100%  224KB   8.6MB/s   00:00    

actions.xml                                                                                                                                                    100% 2100KB  30.4MB/s   00:00    

[oracle@myrac1 19.0]$ scp -r 30894985 myrac2:/u01/app/oracle/product/19.3.0/db_1/inventory/19.0/

inventory.xml                                                                                                                                                  100%   55KB   2.2MB/s   00:00    

actions.xml                                                                                                                                                    100%   95KB   5.6MB/s   00:00    

[oracle@myrac1 19.0]$

[root@myrac2 oneoffs]# ll

總用量 0

drwxr-x--- 4 oracle oinstall 29 6月  15 12:02 29517242

drwxr-x--- 4 oracle oinstall 29 6月  15 12:01 29585399

drwxr-xr-x 2 oracle oinstall  6 6月  15 13:50 30869156

drwxr-xr-x 4 oracle oinstall 29 6月  15 13:48 30894985

[root@myrac2 oneoffs]#

    然後,在節點2繼續應用補丁,竟然報錯:FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (許可權不夠)

[root@myrac2 oneoffs]# /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1/

OPatchauto session is initiated at Tue Jun 15 13:50:41 2020

System initialization log file is /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchautodb/systemconfig2020-06-15_01-50-47PM.log.

會話日誌檔案是/u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/opatchauto2020-06-15_01-51-04PM.log

此會話的 ID 為 BRA8

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0/db_1

Patch applicability verified successfully on home /u01/app/oracle/product/19.0/db_1

Verifying SQL patch applicability on home /u01/app/oracle/product/19.0/db_1

"/bin/sh -c 'cd /u01/app/oracle/product/19.0/db_1; ORACLE_HOME=/u01/app/oracle/product/19.0/db_1 ORACLE_SID=orcl2 /u01/app/oracle/product/19.0/db_1/OPatch/datapatch -prereq -verbose'" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be analyzed by manually retrying the same command.

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

Preparing to bring down database service on home /u01/app/oracle/product/19.0/db_1

Successfully prepared home /u01/app/oracle/product/19.0/db_1 to bring down database service

Bringing down database service on home /u01/app/oracle/product/19.0/db_1

Database service successfully brought down on home /u01/app/oracle/product/19.0/db_1

Performing prepatch operation on home /u01/app/oracle/product/19.0/db_1

Perpatch operation completed successfully on home /u01/app/oracle/product/19.0/db_1

Start applying binary patch on home /u01/app/oracle/product/19.0/db_1

Failed while applying binary patches on home /u01/app/oracle/product/19.0/db_1

未能執行 [OPatchAutoBinaryAction] 補丁程式操作, 有關詳細資訊, 請檢視日誌。故障:

Patch Target : myrac2->/u01/app/oracle/product/19.0/db_1 型別 [rac]

Details: [

---------------------------Patching Failed---------------------------------

Command execution failed during patching in home: /u01/app/oracle/product/19.0/db_1, host: myrac2.

Command failed:  /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto  apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1 -target_type rac_database -binary -invPtrLoc /u01/app/oracle/product/19.0/db_1//oraInst.loc -jre /u01/app/oracle/product/19.0/db_1/OPatch/jre -persistresult /u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_myrac2_rac_2.ser -analyzedresult /u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_myrac2_rac_2.ser

Command failure output: 

==Following patches FAILED in apply:

Patch: /u01/soft/psu/30899722/30869156

Log: /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2020-06-15_13-51-31下午_1.log

Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: ApplySession 在系統修改階段失敗... 'ApplySession::apply failed: java.io. IOException: oracle.sysman.oui.patch.PatchException: java.io.FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (許可權不夠)' 

After fixing the cause of failure Run opatchauto resume

]

OPATCHAUTO-68061: 業務流程引擎失敗。

OPATCHAUTO-68061: 業務流程引擎失敗, 返回程式碼為 1

OPATCHAUTO-68061: 有關詳細資料, 請檢視日誌。

OPatchAuto 失敗。

OPatchauto session completed at Tue Jun 15 13:53:44 2020

Time taken to complete the session 3 minutes, 4 seconds

 opatchauto failed with error code 42

[root@myrac2 oneoffs]#

    於是,對比兩個節點/u01/app/oraInventory/ContentsXML/oui-patch.xml 檔案的許可權。

[root@myrac2 oneoffs]# ll /u01/app/oraInventory/ContentsXML/oui-patch.xml

-rw-r--r-- 1 grid oinstall 174 6月  15 13:13 /u01/app/oraInventory/ContentsXML/oui-patch.xml

[root@myrac2 oneoffs]#

[root@myrac1 diag]# ll /u01/app/oraInventory/ContentsXML/oui-patch.xml

-rw-rw---- 1 grid oinstall 174 6月  15 13:19 /u01/app/oraInventory/ContentsXML/oui-patch.xml

[root@myrac1 diag]# 

    處理措施是將節點2的/u01/app/oraInventory/ContentsXML/oui-patch.xml修改成660許可權。

[root@myrac2 oneoffs]# chmod 660 /u01/app/oraInventory/ContentsXML/oui-patch.xml

[root@myrac2 oneoffs]# ll /u01/app/oraInventory/ContentsXML/oui-patch.xml

-rw-rw---- 1 grid oinstall 174 6月  15 13:13 /u01/app/oraInventory/ContentsXML/oui-patch.xml

[root@myrac2 oneoffs]#

    然後,在節點2上繼續應用補丁,竟然又提示:30894985、30869156缺失

[root@myrac2 oneoffs]# /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1/

OPatchauto session is initiated at Tue Jun 15 13:54:28 2020

System initialization log file is /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchautodb/systemconfig2020-06-15_01-54-35PM.log.

會話日誌檔案是/u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/opatchauto2020-06-15_01-54-49PM.log

此會話的 ID 為 27ZL

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0/db_1

Patch applicability verification failed on home /u01/app/oracle/product/19.0/db_1

未能執行 [OPatchAutoBinaryAction] 補丁程式操作, 有關詳細資訊, 請檢視日誌。故障:

Patch Target : myrac2->/u01/app/oracle/product/19.0/db_1 型別 [rac]

Details: [

---------------------------Patching Failed---------------------------------

Command execution failed during patching in home: /u01/app/oracle/product/19.0/db_1, host: myrac2.

Command failed:  /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto  apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1 -target_type rac_database -binary -invPtrLoc /u01/app/oracle/product/19.0/db_1//oraInst.loc -jre /u01/app/oracle/product/19.0/db_1/OPatch/jre -persistresult /u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_myrac2_rac_2.ser -analyze -online -prepare_home

Command failure output: 

==Following patches FAILED in analysis for apply:

Patch: /u01/soft/psu/30899722/30894985

Log: 

Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/30869156 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/actions" or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/inventory" does not exist.

Patch: /u01/soft/psu/30899722/30869156

Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/30869156 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/actions" or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/30869156/etc/config/inventory" does not exist. 

After fixing the cause of failure Run opatchauto resume

]

OPATCHAUTO-68061: 業務流程引擎失敗。

OPATCHAUTO-68061: 業務流程引擎失敗, 返回程式碼為 1

OPATCHAUTO-68061: 有關詳細資料, 請檢視日誌。

OPatchAuto 失敗。

OPatchauto session completed at Tue Jun 15 13:55:03 2020

Time taken to complete the session 0 minute, 35 seconds

 opatchauto failed with error code 42

[root@myrac2 oneoffs]# 

[root@myrac2 oneoffs]# ll

總用量 0

drwxr-x--- 4 oracle oinstall 29 6月  15 12:02 29517242

drwxr-x--- 4 oracle oinstall 29 6月  15 12:01 29585399

drwxr-xr-x 4 oracle oinstall 29 6月  15 13:48 30894985

[root@myrac2 oneoffs]# 

    再次從一節點將30869156傳遞到二節點。

[oracle@myrac1 19.0]$ scp -r 30894985 myrac2:/u01/app/oracle/product/19.3.0/db_1/inventory/19.0/

inventory.xml                                                                                                                                                  100%   55KB   2.2MB/s   00:00    

actions.xml                                                                                                                                                    100%   95KB   5.6MB/s   00:00    

[oracle@myrac1 19.0]

[oracle@myrac1 19.0]$ scp -r  30869156 myrac2:/u01/app/oracle/product/19.3.0/db_1/inventory/19.0/

inventory.xml                                                                                                                                                  100%  224KB   8.6MB/s   00:00    

actions.xml                                                                                                                                                    100% 2100KB  30.4MB/s   00:00    

[oracle@myrac1 19.0]

    在二節點繼續應用補丁成功!

[root@myrac2 oneoffs]# ll

總用量 0

drwxr-x--- 4 oracle oinstall 29 6月  15 12:02 29517242

drwxr-x--- 4 oracle oinstall 29 6月  15 12:01 29585399

drwxr-xr-x 4 oracle oinstall 29 6月  15 13:55 30869156

drwxr-xr-x 4 oracle oinstall 29 6月  15 13:48 30894985

[root@myrac2 oneoffs]# /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto apply /u01/soft/psu/30899722/ -oh /u01/app/oracle/product/19.0/db_1/

OPatchauto session is initiated at Tue Jun 15 13:56:13 2020

System initialization log file is /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchautodb/systemconfig2020-06-15_01-56-16PM.log.

會話日誌檔案是/u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/opatchauto2020-06-15_01-56-29PM.log

此會話的 ID 為 

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0/db_1

Patch applicability verified successfully on home /u01/app/oracle/product/19.0/db_1

Verifying

"/bin/sh -c 'cd /u01/app/oracle/product/19.0/db_1; ORACLE_HOME=/u01/app/oracle/product/19.0/db_1 ORACLE_SID=orcl2 /u01/app/oracle/product/19.0/db_1/OPatch/datapatch -prereq -verbose'" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be analyzed by manually retrying the same command.

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

Preparing to bring down database service on home /u01/app/oracle/product/19.0/db_1

Successfully prepared home /u01/app/oracle/product/19.0/db_1 to bring down database service

Bringing down database service on home /u01/app/oracle/product/19.0/db_1

Database service successfully brought down on home /u01/app/oracle/product/19.0/db_1

Performing prepatch operation on home /u01/app/oracle/product/19.0/db_1

Perpatch operation completed successfully on home /u01/app/oracle/product/19.0/db_1

Start applying binary patch on home /u01/app/oracle/product/19.0/db_1

Binary patch applied successfully on home /u01/app/oracle/product/19.0/db_1

Performing postpatch operation on home /u01/app/oracle/product/19.0/db_1

Postpatch operation completed successfully on home /u01/app/oracle/product/19.0/db_1

Starting database service on home /u01/app/oracle/product/19.0/db_1

Database service successfully started on home /u01/app/oracle/product/19.0/db_1

Preparing home /u01/app/oracle/product/19.0/db_1 after database service restarted

No step execution required.........

Trying to apply SQL patch on home /u01/app/oracle/product/19.0/db_1

"/bin/sh -c 'cd /u01/app/oracle/product/19.0/db_1;ORACLE_HOME=/u01/app/oracle/product/19.0/db_1 ORACLE_SID=orcl2 /u01/app/oracle/product/19.0/db_1/OPatch/datapatch -verbose'" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be applied by manually retrying the same command.

SQL patch applied successfully on home /u01/app/oracle/product/19.0/db_1

OPatchAuto 成功。

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:myrac2

RAC Home:/u01/app/oracle/product/19.0/db_1

Version:19.0.0.0.0

Summary:

==Following patches were SKIPPED:

Patch: /u01/soft/psu/30899722/30869304

Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/soft/psu/30899722/30898856

Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/soft/psu/30899722/30869156

Reason: This patch is already been applied, so not going to apply again.

==Following patches were SUCCESSFULLY applied:

Patch: /u01/soft/psu/30899722/30894985

Log: /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2020-06-15_13-56-53下午_1.log

OPatchauto session completed at Tue Jun 15 13:57:30 2020

Time taken to complete the session 1 minute, 17 seconds

[root@myrac2 oneoffs]#








來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29357786/viewspace-2701481/,如需轉載,請註明出處,否則將追究法律責任。

相關文章