Tentativa de aplicar patch com OPatch falha com erro “NApply was not able to get the list of patches to apply”:

[grid@rac02 ~]$ opatch apply -oh /u01/app/product/19.0.0.0/grid/ -local /tmp/32545008/32579761/
Oracle Interim Patch Installer version 12.2.0.1.25
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/product/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/product/19.0.0.0/grid//oraInst.loc
OPatch version    : 12.2.0.1.25
OUI version       : 12.2.0.7.0
Log file location : /u01/app/product/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-07-02_17-06-59PM_1.log

Verifying environment and performing prerequisite checks...
UtilSession failed: NApply was not able to get the list of patches to apply.
Log file location: /u01/app/product/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-07-02_17-06-59PM_1.log

OPatch failed with error code 73


Nog log uma indicação de problema com um dos patches instalados anteriormente (ou tentativa de de apply):

[grid@rac02 ~]$ cat /u01/app/product/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-07-02_17-06-59PM_1.log
[Jul 2, 2021 5:06:59 PM] [INFO]     CUP_LOG: Trying to load HomeOperations object
[Jul 2, 2021 5:06:59 PM] [INFO]     CUP_LOG: HomeOperations object created. CUP1.0 is enabled
[Jul 2, 2021 5:06:59 PM] [INFO]     OPatch invoked as follows: 'apply -oh /u01/app/product/19.0.0.0/grid/ -local /tmp/32545008/32579761/ -invPtrLoc /u01/app/product/19.0.0      .0/grid//oraInst.loc '
[Jul 2, 2021 5:06:59 PM] [INFO]     Runtime args: [-Xmx3072m, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/u01/app/product/19.0.0.0/grid//cfgtoollogs/opatch, -DCommo      nLog.LOG_SESSION_ID=, -DCommonLog.COMMAND_NAME=apply, -DOPatch.ORACLE_HOME=/u01/app/product/19.0.0.0/grid/, -DOPatch.DEBUG=false, -DOPatch.MAKE=false, -DOPatch.RUNNING_DIR      =/u01/app/product/19.0.0.0/grid/OPatch, -DOPatch.MW_HOME=, -DOPatch.WL_HOME=, -DOPatch.COMMON_COMPONENTS_HOME=, -DOPatch.OUI_LOCATION=/u01/app/product/19.0.0.0/grid//oui,       -DOPatch.FMW_COMPONENT_HOME=, -DOPatch.OPATCH_CLASSPATH=, -DOPatch.WEBLOGIC_CLASSPATH=, -DOPatch.SKIP_OUI_VERSION_CHECK=, -DOPatch.NEXTGEN_HOME_CHECK=false, -DOPatch.PARAL      LEL_ON_FMW_OH=]
[Jul 2, 2021 5:06:59 PM] [INFO]     Heap in use : 25 MB
                                    Total memory: 146 MB
                                    Free memory : 120 MB
                                    Max memory  : 2731 MB
[Jul 2, 2021 5:06:59 PM] [INFO]     Oracle Home       : /u01/app/product/19.0.0.0/grid
                                    Central Inventory : /u01/app/oraInventory
                                       from           : /u01/app/product/19.0.0.0/grid//oraInst.loc
                                    OPatch version    : 12.2.0.1.25
                                    OUI version       : 12.2.0.7.0
                                    OUI location      : /u01/app/product/19.0.0.0/grid//oui
                                    Log file location : /u01/app/product/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-07-02_17-06-59PM_1.log
[Jul 2, 2021 5:06:59 PM] [INFO]     Patch history file: /u01/app/product/19.0.0.0/grid/cfgtoollogs/opatch/opatch_history.txt
[Jul 2, 2021 5:07:01 PM] [INFO]     [OPSR-TIME] Loading raw inventory
[Jul 2, 2021 5:07:01 PM] [INFO]     [OPSR-MEMORY] Loaded all components from inventory. Heap memory in use: 15 (MB)
[Jul 2, 2021 5:07:01 PM] [INFO]     [OPSR-MEMORY] Loaded all one offs from inventory. Heap memory in use: 16 (MB)
[Jul 2, 2021 5:07:01 PM] [INFO]     [OPSR-TIME] Raw inventory loaded successfully
[Jul 2, 2021 5:07:01 PM] [INFO]     NApply::no CAS enabled, OPatch runs with legacy process.
[Jul 2, 2021 5:07:01 PM] [INFO]     Verifying environment and performing prerequisite checks...
[Jul 2, 2021 5:07:01 PM] [INFO]     [OPSR-TIME] Running prerequisite checks
[Jul 2, 2021 5:07:01 PM] [INFO]     opatch-external.jar is in /u01/app/product/19.0.0.0/grid/OPatch/jlib/opatch-external.jar
[Jul 2, 2021 5:07:02 PM] [INFO]     Unable to create patchObject
                                    Possible causes are:
                                       ORACLE_HOME/inventory/oneoffs/32545013 is corrupted. PatchObject constructor: Input file "/u01/app/product/19.0.0.0/grid/inventory/o      neoffs/32545013/etc/config/actions" or "/u01/app/product/19.0.0.0/grid/inventory/oneoffs/32545013/etc/config/inventory" does not exist.
[Jul 2, 2021 5:07:02 PM] [SEVERE]   OUI-67073:UtilSession failed: NApply was not able to get the list of patches to apply.
[Jul 2, 2021 5:07:02 PM] [INFO]     Finishing UtilSession at Fri Jul 02 17:07:02 BRT 2021
[Jul 2, 2021 5:07:02 PM] [INFO]     Log file location: /u01/app/product/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-07-02_17-06-59PM_1.log
[Jul 2, 2021 5:07:02 PM] [INFO]     Stack Description: java.lang.RuntimeException: NApply was not able to get the list of patches to apply.
                                        at oracle.opatch.napplyhelper.PatchValidation.validatePatch(PatchValidation.java:74)
                                        at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:581)
                                        at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:372)
                                        at oracle.opatch.opatchutil.NApply.process(NApply.java:352)
                                        at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1136)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                        at java.lang.reflect.Method.invoke(Method.java:498)
                                        at oracle.opatch.UtilSession.process(UtilSession.java:355)
                                        at oracle.opatch.OPatchSession.process(OPatchSession.java:2660)
                                        at oracle.opatch.OPatch.process(OPatch.java:853)
                                        at oracle.opatch.OPatch.main(OPatch.java:910)
                                    Caused by: java.lang.RuntimeException: NApply was not able to get the list of patches to apply.
                                        ... 13 more
                                    Caused by: java.lang.RuntimeException: NApply was not able to get the list of patches to apply.
                                        ... 13 more

Isso é um erro ao tentar consultar o inventários de patches instalados:

[grid@rac02 ~]$ opatch lspatches
Inventory load failed... LsPatchesSession::loadAndPrintInstalledPatch()
LsPatchesSession failed: Unable to create patchObject
Possible causes are:
   ORACLE_HOME/inventory/oneoffs/32545013 is corrupted. PatchObject constructor: Input file "/u01/app/product/19.0.0.0/grid/inventory/oneoffs/32545013/etc/config/actions"       or "/u01/app/product/19.0.0.0/grid/inventory/oneoffs/32545013/etc/config/inventory" does not exist.


OPatch failed with error code 2

Para resolver esse impasse, usei a mesma solução descrita no post Oracle RAC 19c: OPatch falha ao aplicar Release Update 19cR10 no segundo node do cluster, a partir da etapa 2, que consiste em excluir a pasta do patch causando erro e copiar a mesma do outro node do cluster em que o patch foi aplicado com sucesso. Por fim, pode ser feito rollback do patch e apply limpo com OPatch ou OPatchAuto.

Leave a Reply

Discover more from Blog do Dibiei

Subscribe now to keep reading and get access to the full archive.

Continue reading