Friday, June 3, 2022

Exception Occured while executiong Apply Operation: ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 127'

Today I got the following error installing the RU7 for OEM 13.5 :

$ /u01/app/oem13c/emcc_135/OMSPatcher/omspatcher apply -property_file /u01/app/oem13c/aux/property_file

OMSPatcher Automation Tool
Copyright (c) 2017, Oracle Corporation.  All rights reserved. 

...

OMSPatcher failed to apply following patch(es) "34003606" "34003614" "34003617" "34003654" "34003678"  to core/plugin Oracle home(s).


Logfile said that the error occured while executing PRE script :

[Jun 3, 2022 10:44:33 AM]    NApplyReport Log file: /u01/app/oem13c/emcc_135/cfgtoollogs/opatch/opatch2022-06-03_10-41-10AM_1.log
[Jun 3, 2022 10:45:30 AM]    Exception Occured while executiong Apply Operation: ApplySession failed in system modification phase... 'Execution of PRE script failed, with return value = 127
'
[Jun 3, 2022 10:45:30 AM]    NApply Logfile: /u01/app/oem13c/emcc_135/cfgtoollogs/opatch/opatch2022-06-03_10-41-10AM_1.log

The main cause of that was the spaces in the path of unpacked RU patch directory. But what to do in this case ? Trying to resume (or reapply) the installation is obvious, but it wouldn't work because of the spaces in the path neither omspatcher rollback would.

But how to overcome spaces-in-the-path issue ? Go to the OMS oracle home and fix it manually 😉 :

1. unzip/move the patch to the new location without spaces in the path.

2. edit some files in the OMS oracle home

$ cd $ORACLE_HOME/.omspatcher_storage

Edit the files :

- .patch_failure.properties

- restoreSteps.txt

- file under the execution_txt variable inside .patch_failure.properties

3. run omspatcher resume command and Bob is your uncle !

Good Luck !

No comments:

Post a Comment