Search Blog Post

Sunday, March 30, 2014

AutoPatch error: The worker should not have status 'Running' or 'Restarted' at this point.

Problem:
Recently while applying a patch through apatch in Oracle EBS R12 version, the adpatch session got terminated due to network issues. 
So I thought to re-start the patch from another session but before doing that I jumped in $APPL_TOP/admin/appl/<CONTEXT_NAME>/log directory to review the log file created by adpatch session to look for any AutoPatch errors and warnings.
I see the below error in adpatch.log
AutoPatch error:
The worker should not have status 'Running' or 'Restarted' at this point.
Telling workers to quit...
All workers have quit.
AutoPatch error:
Error running SQL and EXEC commands in parallel


Cause:
Lost connectivity, did not use screen command before applying patch through adpatch.

Solution:
Before starting another adpatch session or continuing with old session, we need to address all manager that a worker failed its job or we need to clean up all the previous workers and make sure the status of workers shows quit while checking through adrctl utility.
  • Start adctrl and look at the worker status. Are workers running or started? If so, from within adctrl, tell workers to quit
  • Select option: Show Worker Status, tell adctrl that the worker failed and to restart
  • Start applying the patch from the beginning and choose not run the previous adpatch session 
There are times when the workers appears in hung state, in such scenarios you may need to terminate the process manually as follows:
  • Get the worker’s Process ID
 Unix: Issue " ps -efa | grep adworker "
After killing all the workers process which appeared to hang, you can start the adpatch again.
  • Start applying the patch from the beginning and choose NOT to run the previous adpatch session
  • When it prompts to delete the existing FND_INSTALL_PROCESSES table, type "Yes" 
Note: adpatch creates the FND_INSTALL_PROCESSES table, assigns each worker a unique ID, and inserts a row for each worker. This table serves as a staging area for the job information, and as a way for the manager and the worker to communicate. Once all jobs are complete, the manager tells the workers to shut down, and then drops the FND_INSTALL_PROCESSES table.
Please make sure FND_INSTALL_PROCESS should not be present before applying a patch through adpatch.

1 comment:

  1. hi,am new to apps...am trying to apply patch 9239089...its been running for about 20 hrs...only one worker is in running state...rest are in wait..how to fix...could you please help...

    ReplyDelete