As usual, a client reached out with this issue:
OMSPatcher finds that previous patching session is not yet completed. Please refer log file "/u01/app/oracle/middleware/cfgtoollogs/omspatcher/28018178/omspatcher_2018-07-09_23-44-58PM_deploy.log" for the previous session and execute the script "/u01/app/oracle/middleware/.omspatcher_storage/oms_session/scripts_2018-07-09_23-44-39PM/run_script_singleoms_resume.sh" to complete the previous session. OMSPatcher can proceed to execute new operations only if previous session is completed successfully.
This means a patch execution in July failed and it wasn’t noticed.
What to do? Point is, the error itself already say what needs to be done.
You just may want to make it properly. How? Here is a quick Action Plan:
ZER0) Check the Deploy log to understand the root cause for the failure on previous patch and fix it.
In my case?
Not all required components were down.
A simple “stop oms” stops only the OMS managed server, JVMD engine, and HTTP server but leaves Node Manager and Administration Server running.
However, a “stop oms -all” stops all Enterprise Manager processes including Administration Server, OMS, HTTP Server, Node Manager, Management Server, JVMD engine, and Oracle BI Publisher (if it is configured on the host). This was the fixing.
1. Blackout targets to avoid unwanted pages.
– On OEM: Enterprise–>Monitoring–>Blackouts
2. Shutdown OMS and AGENT
cd $AGENT_HOME/bin ./emctl stop agent cd $OMS_HOME/bin ./emctl stop oms -all
3. Resume Patching with issue (with provided command)
(in my case):
4. Verify patches got installed
$OMS_HOME/OPatch/opatch lsinventory $OMS_HOME/OMSPatcher/omspatcher lspatches
5. Start the OMS and agent
cd $AGENT_HOME/bin ./emctl start agent cd $OMS_HOME/bin ./emctl start oms ./emctl status oms -details
6. Sync EMCLI with server changes:
$OMS_HOME/bin/emcli login -username=sysman Enter password : <-- sysman password $OMS_HOME/bin/emcli sync
The output of a continued patch? Here it goes:
[oracle@oem13c ]$ /u01/app/oracle/middleware/.omspatcher_storage/oms_session/scripts_2018-07-09_23-44-39PM/run_script_singleoms_resume.sh Verifying embedded script host-address "oem13c" against the network interface for a match... Trying for a match with: fe80:0:0:0:250:56ff:febc:4399%2(fe80:0:0:0:250:56ff:febc:4399%2) Trying for a match with: oem13c(10.10.10.10) Script-host address matched with host network interface. Please provide credential for OMS repository SYSMAN user: Command to execute (Step 1): /u01/app/oracle/middleware/bin/emctl applypatch repos -patchHome /u01/app/oracle/middleware/.omspatcher_storage/27926184_May_14_2018_14_47_56/original_patch -pluginHome /u01/app/oracle/middleware/plugins/oracle.sysman.emas.oms.plugin_184.108.40.206.0 Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. *********************************************** Executing Patch Application Steps..... *********************************************** Enter the SYSMAN password: Please enter the database password(User:SYSMAN): Processing command line .... Repository_Patching_Utility - Checking Prerequisites Checking Global Prerequisites Repository_Patching_Utility - Checking Prerequisites Checking Component Prerequisites Repository_Patching_Utility - Creating Tablespaces Validating and Creating Tablespaces Repository_Patching_Utility - ApplyRepositoryPatch Repository ApplyRepositoryPatch in progress. Percent Complete: 55 Percent Complete: 58 Percent Complete: 61 Percent Complete: 64 Percent Complete: 75 Percent Complete: 100 Repository_Patching_Utility: ApplyRepositoryPatch - Completion Summary Database details: Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oem13c)(PORT=1521)))(CONNECT_DATA=(SID=oemdb))) Connected As : SYSMAN RCU Logfile : /u01/app/oracle/middleware/oracle_common/rcu/log/empatch/rcu_2018_12_4__11_10_49.log Component schemas created: Component Status Logfile EM Repository Patch Application Success /u01/app/oracle/middleware/oracle_common/rcu/log/empatch/em_patch_apply.log Repository_Patching_Utility - ApplyRepositoryPatch : Operation Completed
Hope it helps!