You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oozie.apache.org by Eduardo Afonso Ferreira <ea...@yahoo.com> on 2012/09/28 00:05:04 UTC

Action stuck in PREP state.

Hi there,

I've seen some posts about this problem, but I still could not determine what causes it and what is the fix for it.

I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3) until this morning on a VM running Ubuntu 10.04.3 LTS.
The database is MySQL running on another VM, same Ubuntu version, MySQL server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I connect).

I have coordinators launching workflows with frequency=3, concurrency=2. 5 to 10 Coordinators.

My workflows run 2-3 actions each, java, pig, shell (python). Nothing too heavy.


This morning I upgraded Oozie to version 3.2.0 built from the stable branch I downloaded from here (http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).

I ran this version for at least one week, maybe two in a REF environment without any problems, but I'm having issues in PROD.

I see connection issues to MySQL, timeouts, workflow actions getting stuck in PREP state.

Do you guys know what could be causing this problem? Anything I may have missed on the PROD environment?

Related to the problem, I see on the oozie.log file it displays the following:


2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]
2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobUpdateJPAExecutor]
2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended with an active transaction, rolling back
2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]


Actions that complete the processing perform other operations before releasing the lock listed on the last line above. I suspect something is failing before that, but I don't see a log message indicating what happened.

If you have insights on this problem, please help me.

Thank you.
Eduardo.

Re: Action stuck in PREP state.

Posted by Eduardo Afonso Ferreira <ea...@yahoo.com>.
Hey, Virag,

Here's the log information. I think attachment won't work, right?
Sorry, the log information may be large.

The Workflow Action ID is this: 0000173-120927111953690-oozie-oozi-W

I did a grep for that in the log files close to the time the problem happened.
Thanks for your help.

Here you go:

ad_counts.stuck:0000173-120927111953690-oozie-oozi-W
oozie.log.2012-09-27-13:2012-09-27 13:39:00,338 DEBUG SubmitXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Workflow record created, Status [PREP]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,350 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for [0000173-120927111953690-oozie-oozi-W] in [start]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,350 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,358 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Precondition check for command [start] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,358 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Execute command [start] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,358 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] STARTED SignalCommand for jobid=0000173-120927111953690-oozie-oozi-W, actionId=null
oozie.log.2012-09-27-13:2012-09-27 13:39:00,360 DEBUG LiteWorkflowInstance:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Starting job
oozie.log.2012-09-27-13:2012-09-27 13:39:00,360 DEBUG LiteWorkflowInstance:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Signaling job execution path [/] signal value [::start::]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,361 DEBUG LiteWorkflowInstance:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Exiting node [::start::] with transition[/#pig-node]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,362 DEBUG LiteWorkflowInstance:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Signaling job execution path [/] signal value [::synch::]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,363 DEBUG LiteWorkflowStoreService:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-]  Creating action for node [pig-node]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,363 DEBUG LiteWorkflowStoreService:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Setting action for cred: 'null', name: 'pig-node'
oozie.log.2012-09-27-13:2012-09-27 13:39:00,363 DEBUG LiteWorkflowStoreService:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Setting action for userRetryMax: '0', userRetryInterval: '10', name: 'pig-node'
oozie.log.2012-09-27-13:2012-09-27 13:39:00,382 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] SignalXCommand: Name: pig-node, Id: 0000173-120927111953690-oozie-oozi-W@pig-node, Authcode:null
oozie.log.2012-09-27-13:2012-09-27 13:39:00,395 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Updated the workflow status to 0000173-120927111953690-oozie-oozi-W  status =RUNNING
oozie.log.2012-09-27-13:2012-09-27 13:39:00,395 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] ENDED SignalCommand for jobid=0000173-120927111953690-oozie-oozi-W, actionId=null
oozie.log.2012-09-27-13:2012-09-27 13:39:00,395 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Queuing [2] commands with delay [0]ms
oozie.log.2012-09-27-13:2012-09-27 13:39:00,397 DEBUG StartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for [0000173-120927111953690-oozie-oozi-W] in [start]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,397 DEBUG CoordActionStartXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Updating WF record for WFID :0000173-120927111953690-oozie-oozi-W with parent id: 0000000-120927111953690-oozie-oozi-C@47
oozie.log.2012-09-27-13:2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-13:2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]
oozie.log.2012-09-27-13:2012-09-27 13:49:08,470  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-13:2012-09-27 13:59:08,561  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-14:2012-09-27 14:09:08,677  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-14:2012-09-27 14:19:08,758  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-14:2012-09-27 14:29:08,851  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-14:2012-09-27 14:39:08,958  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-14:2012-09-27 14:49:09,045  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-14:2012-09-27 14:59:09,139  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-15:2012-09-27 15:09:09,229  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-15:2012-09-27 15:19:09,318  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-15:2012-09-27 15:20:51,623 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773651609] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:20:51,623 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773651609] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:20:51,624 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773651609] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:20:51,624 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773651609] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:20:51,624 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:20:51,625 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:20:51,625 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:03,919 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=definition&_dc=1348773663905] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:21:03,919 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=definition&_dc=1348773663905] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:21:03,919 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=definition&_dc=1348773663905] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:21:03,919 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=definition&_dc=1348773663905] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:21:03,919 DEBUG DefinitionXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:03,925 DEBUG DefinitionXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Precondition check for command [definition] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:03,926 DEBUG DefinitionXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Execute command [definition] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:04,680 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773664667] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:21:04,680 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773664667] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:21:04,681 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773664667] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:21:04,681 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773664667] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:21:04,681 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:04,681 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:04,682 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:54,806 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773709789] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:21:54,806 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773709789] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:21:54,806 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773709789] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:21:54,806 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348773709789] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:21:54,807 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:54,807 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:21:54,808 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:22:11,892 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773726827] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:22:11,892 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773726827] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:22:11,892 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773726827] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:22:11,892 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348773726827] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:22:11,893 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:22:11,893 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:22:11,894 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:29:09,417  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-15:2012-09-27 15:29:22,514 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348774157495] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:29:22,514 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348774157495] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:29:22,515 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348774157495] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:29:22,515 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348774157495] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:29:22,515 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:29:22,516 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:29:22,516 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:29:54,454 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348774189435] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:29:54,454 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348774189435] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:29:54,454 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348774189435] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:29:54,454 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348774189435] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:29:54,455 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:29:54,455 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:29:54,455 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:39:09,513  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-15:2012-09-27 15:49:09,603  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING
oozie.log.2012-09-27-15:2012-09-27 15:52:13,771 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348775533748] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:52:13,771 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348775533748] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:52:13,771 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348775533748] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:52:13,771 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?_dc=1348775533748] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:52:13,772 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:52:13,772 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:52:13,772 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:52:20,137 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348775540124] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:52:20,137 DEBUG AuthenticationFilter:337 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348775540124] triggering authentication
oozie.log.2012-09-27-15:2012-09-27 15:52:20,137 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348775540124] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:52:20,137 DEBUG AuthenticationFilter:347 - Request [http://aspenuzi1.cnn.vgtf.net:11000/oozie/v1/job/0000173-120927111953690-oozie-oozi-W?show=log&_dc=1348775540124] user [null] authenticated
oozie.log.2012-09-27-15:2012-09-27 15:52:20,138 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:52:20,138 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Precondition check for command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:52:20,139 DEBUG JobXCommand:545 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Execute command [job.info] key [0000173-120927111953690-oozie-oozi-W]
oozie.log.2012-09-27-15:2012-09-27 15:59:09,689  WARN CoordActionCheckXCommand:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-120927111953690-oozie-oozi-C] ACTION[0000000-120927111953690-oozie-oozi-C@47] Unexpected workflow 0000173-120927111953690-oozie-oozi-W STATUS RUNNING





________________________________
 From: Eduardo Afonso Ferreira <ea...@yahoo.com>
To: "user@oozie.apache.org" <us...@oozie.apache.org> 
Sent: Saturday, September 29, 2012 7:50 PM
Subject: Re: Action stuck in PREP state.
 
Hey, Virag.

Sorry I probably did not explain the problem properly.
Let me try to make it more clear :)

I have a Coordinator with frequency=3 (minutes) and concurrency=2.
My Coordinator launches one app Workflow.
My Workflow has 2 actions, 1st is a Pig, 2nd is a Shell.
The Workflow launches the Pig action.
The Pig action completes and the Workfolw launches the Shell action.
When both actions complete, the Workflow completes.

I'm sure you know how this works very well. 

Under hight traffic, my pig actions have a lot of data to process and they take longer than 3 minutes to complete.
So, the coordinator launches up to 2 workflows due to concurrency=2.
As traffic continues heavy, several workflow instances are moved to the READY state to run when there's room.
When traffic diminishes, the processing will catch up and eventually all READY workflows will run.
Most of the time, everything works as expected.

Here's when the problem happens every once in a while:
The Pig action gets stuck in the PREP state for some reason I don't know.
When that happens, here's what I have:

Coordinator State: RUNNING
Workflow State: RUNNING
Action (Pig) State: PREP


As the Workflow is RUNNING, the Coordinator won't launch a new Workflow instance to "occupy" that concurrency slot.
When 2 Workflows get in that situation, both slots in my Coordinator will be occupied and therefore no more Workflows will be launched anymore.


Let me know if this is enough information (sorry, I probably still wrote too much).
Thank you.
Eduardo.


________________________________
From: Virag Kothari <vi...@yahoo-inc.com>
To: "user@oozie.apache.org" <us...@oozie.apache.org>; Eduardo Afonso Ferreira <ea...@yahoo.com> 
Sent: Friday, September 28, 2012 4:12 PM
Subject: Re: Action stuck in PREP state.

Hi Eduardo, 

I am bit confused by this entire thread of discussion. From your initial
question, I thought you meant your workflow action was stuck in 'PREP' and
not coordinator action.
If that is true, the coordinator is running fine (RUNNING state) and has
already spawned the workflow.
You don't need to modify any coordinator related knobs. Can you clarify
what is getting stuck (workflow, coordinator) and in which state (PREP,
WAITING etc.)?. Also, please paste the entire logs related to that action.

Thanks,
Virag



On 9/28/12 11:53 AM, "Mona Chitnis" <ch...@yahoo-inc.com> wrote:

>
>See answers inline
>
>--
>Mona Chitnis
>
>
>On 9/28/12 9:22 AM, "Eduardo Afonso Ferreira"
><ea...@yahoo.com>> wrote:
>
>Hey, Mona,
>
>Hi Eduardo,
>
>Thanks for the deliberation on the suggestions. For max concurrent db
>connections, we do not have any benchmarks currently around a recommended
>number, but it can be an estimate of what you think your particular
>database can handle without hitting network issues. For e.g. For some
>prod oracle servers, I have seen it set to ~300.
>
>
>The list of jobs in the PROD environment is basically the same as in REF.
>
>When you mentioned "more database-intensive" I assume you're referring to
>the communication with the Oozie DB and in that case, nothing is
>different. My jobs don't do anything extra communication with the Oozie
>DB. I just submit a handful of coordinators to Oozie server and let Oozie
>take care of the rest.
>
>The main difference between REF and PROD is that in PROD we have a much
>larger data to process and therefore, the jobs that run on the hadoop
>cluster take longer to complete and we may have a larger number of
>concurrent oozie workflows running. So, I see the importance of setting
>the max active conn accordingly
>(oozie.service.JPAService.pool.max.active.conn). I currently have it at
>50, but do you have a recommendation on the ideal value for that? How do
>you determine what number is good, like not too small but not too large?
>
>If you want to configure your Oozie server to check for available input
>dependencies more frequently, you can reduce the
>"oozie.service.coord.input.check.requeue.interval" (default is 60 sec).
>Though it will result in more memory usage (oozie queue) and network
>usage (requests to NN), but it might make your actions start sooner.
>
>What does the timeout attribute do
>(oozie.service.coord.normal.default.timeout)? It's currently set at 120
>(minutes).
>
>This is the timeout for a coordinator action input check (in minutes) for
>normal job. But the default value is pretty high, so unless you set a
>smaller non-default, this is not to worry about.
>
>How the throttle attributes affect the way coordinators launch new
>workflows?
>I'm talking about the attributes oozie.service.coord.default.throttle
>(12) and oozie.service.coord.materialization.throttling.factor (0.05).
>Are there any other attributes I could or should use that are related to
>materialization?
>
>oozie.service.coord.default.throttle (12) controls how many actions per
>coordinator can be in state WAITING concurrently. WAITING is when the
>input dependency checks occur. The "materialization.throttling.factor" is
>similar, but this is a function (percentage) of your queue size. This
>makes more sense in a multi-tenant environment when you don't want all of
>your Oozie command queue getting filled up only one user's job.
>
>
>Also, would you elaborate a little more on how I can control the
>materialization so that my coordinators won't get stuck like it's
>happening every once in a while in my PROD environment?
>
>
>How should I set those attributes to cause coordinators to do things like
>these:
>- Always launch new jobs (workflows) if their nominal time is reached and
>there's room (max concurrency not reached yet).
>- Launch most current jobs first (execution=LIFO)
>
>One of the coordinator <control><execution-order> tags. Set it to LIFO.
>Possible values are
>
>* FIFO (oldest first) default
>* LIFO (newest first)
>* LAST_ONLY (discards all older materializations)
>
>- Don't create a bunch of WAITING jobs. I don't care about WAITING
>(future) jobs, but just READY ones, i.e. nominal time is reached (or
>about to be reached).
>
>Jobs will go to WAITING first, have their input dependencies checked, and
>then become READY. For this case (to avoid stuck jobs, ok with fewer jobs
>but READY more quickly) decrease your throttle values and decrease input
>check requeue interval (not too much) to have actions addressed faster.
>
>- Don't leave actions in the PREP state forever. If they can't start for
>any reason, either retry or get them out of the way (FAIL, KILL,
>whatever). Whenever an action is left in the PREP state, one of the
>concurrency slots is blocked and if several actions get in the same
>scenario, pretty soon the coordinator will get stuck with no more room to
>launch new tasks.
>
>Actions will not block concurrency slots in PREP (PREP just means action
>id persisted in database).
>
>Let me know if the above steps work for you. Happy to help.
>
>
>
>Thank you.
>Eduardo.
>
>
>
>________________________________
>From: Mona Chitnis <ch...@yahoo-inc.com>>
>To: "user@oozie.apache.org<ma...@oozie.apache.org>"
><us...@oozie.apache.org>>; Eduardo Afonso
>Ferreira <ea...@yahoo.com>>
>Sent: Thursday, September 27, 2012 6:25 PM
>Subject: Re: Action stuck in PREP state.
>Hi Eduardo,
>
>If your PROD environment has jobs that are more database-intensive, can
>you check/increase your oozie server settings for the following
>
>*   oozie.service.JPAService.pool.max.active.conn
>*   oozie.service.coord.normal.default.timeout
>
>Other properties to check
>
>*   oozie.command.default.lock.timeout
>*   If materialization window value is large (you want more coord actions
>to get materialized simultaneously), but the throttling factor is low,
>then your actions will stay in PREP
>
>Your log errors are pointing towards transaction-level problems. Can you
>elaborate a bit more on the difference between your REF and PROD
>environments?
>
>--
>Mona Chitnis
>
>
>
>On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira"
><ea...@yahoo.com>>
> wrote:
>
>Hi there,
>
>I've seen some posts about this problem, but I still could not determine
>what causes it and what is the fix for it.
>
>I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3)
>until this morning on a VM running Ubuntu 10.04.3 LTS.
>The database is MySQL running on another VM, same Ubuntu version, MySQL
>server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I
>connect).
>
>I have coordinators launching workflows with frequency=3, concurrency=2.
>5 to 10 Coordinators.
>
>My workflows run 2-3 actions each, java, pig, shell (python). Nothing too
>heavy.
>
>
>This morning I upgraded Oozie to version 3.2.0 built from the stable
>branch I downloaded from here
>(http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).
>
>I ran this version for at least one week, maybe two in a REF environment
>without any problems, but I'm having issues in PROD.
>
>I see connection issues to MySQL, timeouts, workflow actions getting
>stuck in PREP state.
>
>Do you guys know what could be causing this problem? Anything I may have
>missed on the PROD environment?
>
>Related to the problem, I see on the oozie.log file it displays the
>following:
>
>
>2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for
>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for
>[0000173-120927111953690-oozie-oozi-W]
>2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] Executing JPAExecutor
>[WorkflowJobUpdateJPAExecutor]
>2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
>2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended
>with an active transaction, rolling back
>2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for
>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>
>
>Actions that complete the processing perform other operations before
>releasing the lock listed on the last line above. I suspect something is
>failing before that, but I don't see a log message indicating what
>happened.
>
>If you have insights on this problem, please help me.
>
>Thank you.
>Eduardo.

Re: Action stuck in PREP state.

Posted by Virag Kothari <vi...@yahoo-inc.com>.
Hey Eduardo,

No need to be sorry at all. I was just trying to get better understanding
of the problem.

Usually after the workflow action submits a hadoop job, it moves from PREP
to RUNNING. But as the action is stuck in PREP, I don't think it was able
to submit a hadoop job. I am not sure why this happened. But does the
hadoop cluster have enough map slots?
Also, it would be helpful if you can paste the logs related to the stuck
Pig action (0000173-120927111953690-oozie-oozi-W@pig-node)

Thanks,
Virag

On 9/29/12 4:50 PM, "Eduardo Afonso Ferreira" <ea...@yahoo.com> wrote:

>Hey, Virag.
>
>Sorry I probably did not explain the problem properly.
>Let me try to make it more clear :)
>
>I have a Coordinator with frequency=3 (minutes) and concurrency=2.
>My Coordinator launches one app Workflow.
>My Workflow has 2 actions, 1st is a Pig, 2nd is a Shell.
>The Workflow launches the Pig action.
>The Pig action completes and the Workfolw launches the Shell action.
>When both actions complete, the Workflow completes.
>
>I'm sure you know how this works very well.
>
>Under hight traffic, my pig actions have a lot of data to process and
>they take longer than 3 minutes to complete.
>So, the coordinator launches up to 2 workflows due to concurrency=2.
>As traffic continues heavy, several workflow instances are moved to the
>READY state to run when there's room.
>When traffic diminishes, the processing will catch up and eventually all
>READY workflows will run.
>Most of the time, everything works as expected.
>
>Here's when the problem happens every once in a while:
>The Pig action gets stuck in the PREP state for some reason I don't know.
>When that happens, here's what I have:
>
>Coordinator State: RUNNING
>Workflow State: RUNNING
>Action (Pig) State: PREP
>
>
>As the Workflow is RUNNING, the Coordinator won't launch a new Workflow
>instance to "occupy" that concurrency slot.
>When 2 Workflows get in that situation, both slots in my Coordinator will
>be occupied and therefore no more Workflows will be launched anymore.
>
>
>Let me know if this is enough information (sorry, I probably still wrote
>too much).
>Thank you.
>Eduardo.
>
>
>________________________________
> From: Virag Kothari <vi...@yahoo-inc.com>
>To: "user@oozie.apache.org" <us...@oozie.apache.org>; Eduardo Afonso
>Ferreira <ea...@yahoo.com>
>Sent: Friday, September 28, 2012 4:12 PM
>Subject: Re: Action stuck in PREP state.
>
>Hi Eduardo,
>
>I am bit confused by this entire thread of discussion. From your initial
>question, I thought you meant your workflow action was stuck in 'PREP' and
>not coordinator action.
>If that is true, the coordinator is running fine (RUNNING state) and has
>already spawned the workflow.
>You don't need to modify any coordinator related knobs. Can you clarify
>what is getting stuck (workflow, coordinator) and in which state (PREP,
>WAITING etc.)?. Also, please paste the entire logs related to that action.
>
>Thanks,
>Virag
>
>
>
>On 9/28/12 11:53 AM, "Mona Chitnis" <ch...@yahoo-inc.com> wrote:
>
>>
>>See answers inline
>>
>>--
>>Mona Chitnis
>>
>>
>>On 9/28/12 9:22 AM, "Eduardo Afonso Ferreira"
>><ea...@yahoo.com>> wrote:
>>
>>Hey, Mona,
>>
>>Hi Eduardo,
>>
>>Thanks for the deliberation on the suggestions. For max concurrent db
>>connections, we do not have any benchmarks currently around a recommended
>>number, but it can be an estimate of what you think your particular
>>database can handle without hitting network issues. For e.g. For some
>>prod oracle servers, I have seen it set to ~300.
>>
>>
>>The list of jobs in the PROD environment is basically the same as in REF.
>>
>>When you mentioned "more database-intensive" I assume you're referring to
>>the communication with the Oozie DB and in that case, nothing is
>>different. My jobs don't do anything extra communication with the Oozie
>>DB. I just submit a handful of coordinators to Oozie server and let Oozie
>>take care of the rest.
>>
>>The main difference between REF and PROD is that in PROD we have a much
>>larger data to process and therefore, the jobs that run on the hadoop
>>cluster take longer to complete and we may have a larger number of
>>concurrent oozie workflows running. So, I see the importance of setting
>>the max active conn accordingly
>>(oozie.service.JPAService.pool.max.active.conn). I currently have it at
>>50, but do you have a recommendation on the ideal value for that? How do
>>you determine what number is good, like not too small but not too large?
>>
>>If you want to configure your Oozie server to check for available input
>>dependencies more frequently, you can reduce the
>>"oozie.service.coord.input.check.requeue.interval" (default is 60 sec).
>>Though it will result in more memory usage (oozie queue) and network
>>usage (requests to NN), but it might make your actions start sooner.
>>
>>What does the timeout attribute do
>>(oozie.service.coord.normal.default.timeout)? It's currently set at 120
>>(minutes).
>>
>>This is the timeout for a coordinator action input check (in minutes) for
>>normal job. But the default value is pretty high, so unless you set a
>>smaller non-default, this is not to worry about.
>>
>>How the throttle attributes affect the way coordinators launch new
>>workflows?
>>I'm talking about the attributes oozie.service.coord.default.throttle
>>(12) and oozie.service.coord.materialization.throttling.factor (0.05).
>>Are there any other attributes I could or should use that are related to
>>materialization?
>>
>>oozie.service.coord.default.throttle (12) controls how many actions per
>>coordinator can be in state WAITING concurrently. WAITING is when the
>>input dependency checks occur. The "materialization.throttling.factor" is
>>similar, but this is a function (percentage) of your queue size. This
>>makes more sense in a multi-tenant environment when you don't want all of
>>your Oozie command queue getting filled up only one user's job.
>>
>>
>>Also, would you elaborate a little more on how I can control the
>>materialization so that my coordinators won't get stuck like it's
>>happening every once in a while in my PROD environment?
>>
>>
>>How should I set those attributes to cause coordinators to do things like
>>these:
>>- Always launch new jobs (workflows) if their nominal time is reached and
>>there's room (max concurrency not reached yet).
>>- Launch most current jobs first (execution=LIFO)
>>
>>One of the coordinator <control><execution-order> tags. Set it to LIFO.
>>Possible values are
>>
>>* FIFO (oldest first) default
>>* LIFO (newest first)
>>* LAST_ONLY (discards all older materializations)
>>
>>- Don't create a bunch of WAITING jobs. I don't care about WAITING
>>(future) jobs, but just READY ones, i.e. nominal time is reached (or
>>about to be reached).
>>
>>Jobs will go to WAITING first, have their input dependencies checked, and
>>then become READY. For this case (to avoid stuck jobs, ok with fewer jobs
>>but READY more quickly) decrease your throttle values and decrease input
>>check requeue interval (not too much) to have actions addressed faster.
>>
>>- Don't leave actions in the PREP state forever. If they can't start for
>>any reason, either retry or get them out of the way (FAIL, KILL,
>>whatever). Whenever an action is left in the PREP state, one of the
>>concurrency slots is blocked and if several actions get in the same
>>scenario, pretty soon the coordinator will get stuck with no more room to
>>launch new tasks.
>>
>>Actions will not block concurrency slots in PREP (PREP just means action
>>id persisted in database).
>>
>>Let me know if the above steps work for you. Happy to help.
>>
>>
>>
>>Thank you.
>>Eduardo.
>>
>>
>>
>>________________________________
>>From: Mona Chitnis <ch...@yahoo-inc.com>>
>>To: "user@oozie.apache.org<ma...@oozie.apache.org>"
>><us...@oozie.apache.org>>; Eduardo Afonso
>>Ferreira <ea...@yahoo.com>>
>>Sent: Thursday, September 27, 2012 6:25 PM
>>Subject: Re: Action stuck in PREP state.
>>Hi Eduardo,
>>
>>If your PROD environment has jobs that are more database-intensive, can
>>you check/increase your oozie server settings for the following
>>
>>*   oozie.service.JPAService.pool.max.active.conn
>>*   oozie.service.coord.normal.default.timeout
>>
>>Other properties to check
>>
>>*   oozie.command.default.lock.timeout
>>*   If materialization window value is large (you want more coord actions
>>to get materialized simultaneously), but the throttling factor is low,
>>then your actions will stay in PREP
>>
>>Your log errors are pointing towards transaction-level problems. Can you
>>elaborate a bit more on the difference between your REF and PROD
>>environments?
>>
>>--
>>Mona Chitnis
>>
>>
>>
>>On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira"
>><ea...@yahoo.com>
>>>
>> wrote:
>>
>>Hi there,
>>
>>I've seen some posts about this problem, but I still could not determine
>>what causes it and what is the fix for it.
>>
>>I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3)
>>until this morning on a VM running Ubuntu 10.04.3 LTS.
>>The database is MySQL running on another VM, same Ubuntu version, MySQL
>>server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I
>>connect).
>>
>>I have coordinators launching workflows with frequency=3, concurrency=2.
>>5 to 10 Coordinators.
>>
>>My workflows run 2-3 actions each, java, pig, shell (python). Nothing too
>>heavy.
>>
>>
>>This morning I upgraded Oozie to version 3.2.0 built from the stable
>>branch I downloaded from here
>>(http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).
>>
>>I ran this version for at least one week, maybe two in a REF environment
>>without any problems, but I'm having issues in PROD.
>>
>>I see connection issues to MySQL, timeouts, workflow actions getting
>>stuck in PREP state.
>>
>>Do you guys know what could be causing this problem? Anything I may have
>>missed on the PROD environment?
>>
>>Related to the problem, I see on the oozie.log file it displays the
>>following:
>>
>>
>>2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen]
>>GROUP[-] TOKEN[] APP[ad_counts-wf]
>>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for
>>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>>2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen]
>>GROUP[-] TOKEN[] APP[ad_counts-wf]
>>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for
>>[0000173-120927111953690-oozie-oozi-W]
>>2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>>APP[-] JOB[-] ACTION[-] Executing JPAExecutor
>>[WorkflowJobUpdateJPAExecutor]
>>2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>>APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
>>2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-]
>>APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended
>>with an active transaction, rolling back
>>2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen]
>>GROUP[-] TOKEN[] APP[ad_counts-wf]
>>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for
>>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>>
>>
>>Actions that complete the processing perform other operations before
>>releasing the lock listed on the last line above. I suspect something is
>>failing before that, but I don't see a log message indicating what
>>happened.
>>
>>If you have insights on this problem, please help me.
>>
>>Thank you.
>>Eduardo.


Re: Action stuck in PREP state.

Posted by Eduardo Afonso Ferreira <ea...@yahoo.com>.
Hey, Virag.

Sorry I probably did not explain the problem properly.
Let me try to make it more clear :)

I have a Coordinator with frequency=3 (minutes) and concurrency=2.
My Coordinator launches one app Workflow.
My Workflow has 2 actions, 1st is a Pig, 2nd is a Shell.
The Workflow launches the Pig action.
The Pig action completes and the Workfolw launches the Shell action.
When both actions complete, the Workflow completes.

I'm sure you know how this works very well. 

Under hight traffic, my pig actions have a lot of data to process and they take longer than 3 minutes to complete.
So, the coordinator launches up to 2 workflows due to concurrency=2.
As traffic continues heavy, several workflow instances are moved to the READY state to run when there's room.
When traffic diminishes, the processing will catch up and eventually all READY workflows will run.
Most of the time, everything works as expected.

Here's when the problem happens every once in a while:
The Pig action gets stuck in the PREP state for some reason I don't know.
When that happens, here's what I have:

Coordinator State: RUNNING
Workflow State: RUNNING
Action (Pig) State: PREP


As the Workflow is RUNNING, the Coordinator won't launch a new Workflow instance to "occupy" that concurrency slot.
When 2 Workflows get in that situation, both slots in my Coordinator will be occupied and therefore no more Workflows will be launched anymore.


Let me know if this is enough information (sorry, I probably still wrote too much).
Thank you.
Eduardo.


________________________________
 From: Virag Kothari <vi...@yahoo-inc.com>
To: "user@oozie.apache.org" <us...@oozie.apache.org>; Eduardo Afonso Ferreira <ea...@yahoo.com> 
Sent: Friday, September 28, 2012 4:12 PM
Subject: Re: Action stuck in PREP state.
 
Hi Eduardo, 

I am bit confused by this entire thread of discussion. From your initial
question, I thought you meant your workflow action was stuck in 'PREP' and
not coordinator action.
If that is true, the coordinator is running fine (RUNNING state) and has
already spawned the workflow.
You don't need to modify any coordinator related knobs. Can you clarify
what is getting stuck (workflow, coordinator) and in which state (PREP,
WAITING etc.)?. Also, please paste the entire logs related to that action.

Thanks,
Virag



On 9/28/12 11:53 AM, "Mona Chitnis" <ch...@yahoo-inc.com> wrote:

>
>See answers inline
>
>--
>Mona Chitnis
>
>
>On 9/28/12 9:22 AM, "Eduardo Afonso Ferreira"
><ea...@yahoo.com>> wrote:
>
>Hey, Mona,
>
>Hi Eduardo,
>
>Thanks for the deliberation on the suggestions. For max concurrent db
>connections, we do not have any benchmarks currently around a recommended
>number, but it can be an estimate of what you think your particular
>database can handle without hitting network issues. For e.g. For some
>prod oracle servers, I have seen it set to ~300.
>
>
>The list of jobs in the PROD environment is basically the same as in REF.
>
>When you mentioned "more database-intensive" I assume you're referring to
>the communication with the Oozie DB and in that case, nothing is
>different. My jobs don't do anything extra communication with the Oozie
>DB. I just submit a handful of coordinators to Oozie server and let Oozie
>take care of the rest.
>
>The main difference between REF and PROD is that in PROD we have a much
>larger data to process and therefore, the jobs that run on the hadoop
>cluster take longer to complete and we may have a larger number of
>concurrent oozie workflows running. So, I see the importance of setting
>the max active conn accordingly
>(oozie.service.JPAService.pool.max.active.conn). I currently have it at
>50, but do you have a recommendation on the ideal value for that? How do
>you determine what number is good, like not too small but not too large?
>
>If you want to configure your Oozie server to check for available input
>dependencies more frequently, you can reduce the
>"oozie.service.coord.input.check.requeue.interval" (default is 60 sec).
>Though it will result in more memory usage (oozie queue) and network
>usage (requests to NN), but it might make your actions start sooner.
>
>What does the timeout attribute do
>(oozie.service.coord.normal.default.timeout)? It's currently set at 120
>(minutes).
>
>This is the timeout for a coordinator action input check (in minutes) for
>normal job. But the default value is pretty high, so unless you set a
>smaller non-default, this is not to worry about.
>
>How the throttle attributes affect the way coordinators launch new
>workflows?
>I'm talking about the attributes oozie.service.coord.default.throttle
>(12) and oozie.service.coord.materialization.throttling.factor (0.05).
>Are there any other attributes I could or should use that are related to
>materialization?
>
>oozie.service.coord.default.throttle (12) controls how many actions per
>coordinator can be in state WAITING concurrently. WAITING is when the
>input dependency checks occur. The "materialization.throttling.factor" is
>similar, but this is a function (percentage) of your queue size. This
>makes more sense in a multi-tenant environment when you don't want all of
>your Oozie command queue getting filled up only one user's job.
>
>
>Also, would you elaborate a little more on how I can control the
>materialization so that my coordinators won't get stuck like it's
>happening every once in a while in my PROD environment?
>
>
>How should I set those attributes to cause coordinators to do things like
>these:
>- Always launch new jobs (workflows) if their nominal time is reached and
>there's room (max concurrency not reached yet).
>- Launch most current jobs first (execution=LIFO)
>
>One of the coordinator <control><execution-order> tags. Set it to LIFO.
>Possible values are
>
>* FIFO (oldest first) default
>* LIFO (newest first)
>* LAST_ONLY (discards all older materializations)
>
>- Don't create a bunch of WAITING jobs. I don't care about WAITING
>(future) jobs, but just READY ones, i.e. nominal time is reached (or
>about to be reached).
>
>Jobs will go to WAITING first, have their input dependencies checked, and
>then become READY. For this case (to avoid stuck jobs, ok with fewer jobs
>but READY more quickly) decrease your throttle values and decrease input
>check requeue interval (not too much) to have actions addressed faster.
>
>- Don't leave actions in the PREP state forever. If they can't start for
>any reason, either retry or get them out of the way (FAIL, KILL,
>whatever). Whenever an action is left in the PREP state, one of the
>concurrency slots is blocked and if several actions get in the same
>scenario, pretty soon the coordinator will get stuck with no more room to
>launch new tasks.
>
>Actions will not block concurrency slots in PREP (PREP just means action
>id persisted in database).
>
>Let me know if the above steps work for you. Happy to help.
>
>
>
>Thank you.
>Eduardo.
>
>
>
>________________________________
>From: Mona Chitnis <ch...@yahoo-inc.com>>
>To: "user@oozie.apache.org<ma...@oozie.apache.org>"
><us...@oozie.apache.org>>; Eduardo Afonso
>Ferreira <ea...@yahoo.com>>
>Sent: Thursday, September 27, 2012 6:25 PM
>Subject: Re: Action stuck in PREP state.
>Hi Eduardo,
>
>If your PROD environment has jobs that are more database-intensive, can
>you check/increase your oozie server settings for the following
>
>*   oozie.service.JPAService.pool.max.active.conn
>*   oozie.service.coord.normal.default.timeout
>
>Other properties to check
>
>*   oozie.command.default.lock.timeout
>*   If materialization window value is large (you want more coord actions
>to get materialized simultaneously), but the throttling factor is low,
>then your actions will stay in PREP
>
>Your log errors are pointing towards transaction-level problems. Can you
>elaborate a bit more on the difference between your REF and PROD
>environments?
>
>--
>Mona Chitnis
>
>
>
>On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira"
><ea...@yahoo.com>>
> wrote:
>
>Hi there,
>
>I've seen some posts about this problem, but I still could not determine
>what causes it and what is the fix for it.
>
>I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3)
>until this morning on a VM running Ubuntu 10.04.3 LTS.
>The database is MySQL running on another VM, same Ubuntu version, MySQL
>server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I
>connect).
>
>I have coordinators launching workflows with frequency=3, concurrency=2.
>5 to 10 Coordinators.
>
>My workflows run 2-3 actions each, java, pig, shell (python). Nothing too
>heavy.
>
>
>This morning I upgraded Oozie to version 3.2.0 built from the stable
>branch I downloaded from here
>(http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).
>
>I ran this version for at least one week, maybe two in a REF environment
>without any problems, but I'm having issues in PROD.
>
>I see connection issues to MySQL, timeouts, workflow actions getting
>stuck in PREP state.
>
>Do you guys know what could be causing this problem? Anything I may have
>missed on the PROD environment?
>
>Related to the problem, I see on the oozie.log file it displays the
>following:
>
>
>2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for
>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for
>[0000173-120927111953690-oozie-oozi-W]
>2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] Executing JPAExecutor
>[WorkflowJobUpdateJPAExecutor]
>2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
>2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended
>with an active transaction, rolling back
>2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for
>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>
>
>Actions that complete the processing perform other operations before
>releasing the lock listed on the last line above. I suspect something is
>failing before that, but I don't see a log message indicating what
>happened.
>
>If you have insights on this problem, please help me.
>
>Thank you.
>Eduardo.

Re: Action stuck in PREP state.

Posted by Virag Kothari <vi...@yahoo-inc.com>.
Hi Eduardo, 

I am bit confused by this entire thread of discussion. From your initial
question, I thought you meant your workflow action was stuck in 'PREP' and
not coordinator action.
If that is true, the coordinator is running fine (RUNNING state) and has
already spawned the workflow.
You don't need to modify any coordinator related knobs. Can you clarify
what is getting stuck (workflow, coordinator) and in which state (PREP,
WAITING etc.)?. Also, please paste the entire logs related to that action.

Thanks,
Virag



On 9/28/12 11:53 AM, "Mona Chitnis" <ch...@yahoo-inc.com> wrote:

>
>See answers inline
>
>--
>Mona Chitnis
>
>
>On 9/28/12 9:22 AM, "Eduardo Afonso Ferreira"
><ea...@yahoo.com>> wrote:
>
>Hey, Mona,
>
>Hi Eduardo,
>
>Thanks for the deliberation on the suggestions. For max concurrent db
>connections, we do not have any benchmarks currently around a recommended
>number, but it can be an estimate of what you think your particular
>database can handle without hitting network issues. For e.g. For some
>prod oracle servers, I have seen it set to ~300.
>
>
>The list of jobs in the PROD environment is basically the same as in REF.
>
>When you mentioned "more database-intensive" I assume you're referring to
>the communication with the Oozie DB and in that case, nothing is
>different. My jobs don't do anything extra communication with the Oozie
>DB. I just submit a handful of coordinators to Oozie server and let Oozie
>take care of the rest.
>
>The main difference between REF and PROD is that in PROD we have a much
>larger data to process and therefore, the jobs that run on the hadoop
>cluster take longer to complete and we may have a larger number of
>concurrent oozie workflows running. So, I see the importance of setting
>the max active conn accordingly
>(oozie.service.JPAService.pool.max.active.conn). I currently have it at
>50, but do you have a recommendation on the ideal value for that? How do
>you determine what number is good, like not too small but not too large?
>
>If you want to configure your Oozie server to check for available input
>dependencies more frequently, you can reduce the
>"oozie.service.coord.input.check.requeue.interval" (default is 60 sec).
>Though it will result in more memory usage (oozie queue) and network
>usage (requests to NN), but it might make your actions start sooner.
>
>What does the timeout attribute do
>(oozie.service.coord.normal.default.timeout)? It's currently set at 120
>(minutes).
>
>This is the timeout for a coordinator action input check (in minutes) for
>normal job. But the default value is pretty high, so unless you set a
>smaller non-default, this is not to worry about.
>
>How the throttle attributes affect the way coordinators launch new
>workflows?
>I'm talking about the attributes oozie.service.coord.default.throttle
>(12) and oozie.service.coord.materialization.throttling.factor (0.05).
>Are there any other attributes I could or should use that are related to
>materialization?
>
>oozie.service.coord.default.throttle (12) controls how many actions per
>coordinator can be in state WAITING concurrently. WAITING is when the
>input dependency checks occur. The "materialization.throttling.factor" is
>similar, but this is a function (percentage) of your queue size. This
>makes more sense in a multi-tenant environment when you don't want all of
>your Oozie command queue getting filled up only one user's job.
>
>
>Also, would you elaborate a little more on how I can control the
>materialization so that my coordinators won't get stuck like it's
>happening every once in a while in my PROD environment?
>
>
>How should I set those attributes to cause coordinators to do things like
>these:
>- Always launch new jobs (workflows) if their nominal time is reached and
>there's room (max concurrency not reached yet).
>- Launch most current jobs first (execution=LIFO)
>
>One of the coordinator <control><execution-order> tags. Set it to LIFO.
>Possible values are
>
>* FIFO (oldest first) default
>* LIFO (newest first)
>* LAST_ONLY (discards all older materializations)
>
>- Don't create a bunch of WAITING jobs. I don't care about WAITING
>(future) jobs, but just READY ones, i.e. nominal time is reached (or
>about to be reached).
>
>Jobs will go to WAITING first, have their input dependencies checked, and
>then become READY. For this case (to avoid stuck jobs, ok with fewer jobs
>but READY more quickly) decrease your throttle values and decrease input
>check requeue interval (not too much) to have actions addressed faster.
>
>- Don't leave actions in the PREP state forever. If they can't start for
>any reason, either retry or get them out of the way (FAIL, KILL,
>whatever). Whenever an action is left in the PREP state, one of the
>concurrency slots is blocked and if several actions get in the same
>scenario, pretty soon the coordinator will get stuck with no more room to
>launch new tasks.
>
>Actions will not block concurrency slots in PREP (PREP just means action
>id persisted in database).
>
>Let me know if the above steps work for you. Happy to help.
>
>
>
>Thank you.
>Eduardo.
>
>
>
>________________________________
>From: Mona Chitnis <ch...@yahoo-inc.com>>
>To: "user@oozie.apache.org<ma...@oozie.apache.org>"
><us...@oozie.apache.org>>; Eduardo Afonso
>Ferreira <ea...@yahoo.com>>
>Sent: Thursday, September 27, 2012 6:25 PM
>Subject: Re: Action stuck in PREP state.
>Hi Eduardo,
>
>If your PROD environment has jobs that are more database-intensive, can
>you check/increase your oozie server settings for the following
>
>*   oozie.service.JPAService.pool.max.active.conn
>*   oozie.service.coord.normal.default.timeout
>
>Other properties to check
>
>*   oozie.command.default.lock.timeout
>*   If materialization window value is large (you want more coord actions
>to get materialized simultaneously), but the throttling factor is low,
>then your actions will stay in PREP
>
>Your log errors are pointing towards transaction-level problems. Can you
>elaborate a bit more on the difference between your REF and PROD
>environments?
>
>--
>Mona Chitnis
>
>
>
>On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira"
><ea...@yahoo.com>>
> wrote:
>
>Hi there,
>
>I've seen some posts about this problem, but I still could not determine
>what causes it and what is the fix for it.
>
>I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3)
>until this morning on a VM running Ubuntu 10.04.3 LTS.
>The database is MySQL running on another VM, same Ubuntu version, MySQL
>server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I
>connect).
>
>I have coordinators launching workflows with frequency=3, concurrency=2.
>5 to 10 Coordinators.
>
>My workflows run 2-3 actions each, java, pig, shell (python). Nothing too
>heavy.
>
>
>This morning I upgraded Oozie to version 3.2.0 built from the stable
>branch I downloaded from here
>(http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).
>
>I ran this version for at least one week, maybe two in a REF environment
>without any problems, but I'm having issues in PROD.
>
>I see connection issues to MySQL, timeouts, workflow actions getting
>stuck in PREP state.
>
>Do you guys know what could be causing this problem? Anything I may have
>missed on the PROD environment?
>
>Related to the problem, I see on the oozie.log file it displays the
>following:
>
>
>2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for
>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for
>[0000173-120927111953690-oozie-oozi-W]
>2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] Executing JPAExecutor
>[WorkflowJobUpdateJPAExecutor]
>2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
>2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-]
>APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended
>with an active transaction, rolling back
>2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen]
>GROUP[-] TOKEN[] APP[ad_counts-wf]
>JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for
>[0000173-120927111953690-oozie-oozi-W] in [action.start]
>
>
>Actions that complete the processing perform other operations before
>releasing the lock listed on the last line above. I suspect something is
>failing before that, but I don't see a log message indicating what
>happened.
>
>If you have insights on this problem, please help me.
>
>Thank you.
>Eduardo.


Re: Action stuck in PREP state.

Posted by Mona Chitnis <ch...@yahoo-inc.com>.
See answers inline

--
Mona Chitnis


On 9/28/12 9:22 AM, "Eduardo Afonso Ferreira" <ea...@yahoo.com>> wrote:

Hey, Mona,

Hi Eduardo,

Thanks for the deliberation on the suggestions. For max concurrent db connections, we do not have any benchmarks currently around a recommended number, but it can be an estimate of what you think your particular database can handle without hitting network issues. For e.g. For some prod oracle servers, I have seen it set to ~300.


The list of jobs in the PROD environment is basically the same as in REF.

When you mentioned "more database-intensive" I assume you're referring to the communication with the Oozie DB and in that case, nothing is different. My jobs don't do anything extra communication with the Oozie DB. I just submit a handful of coordinators to Oozie server and let Oozie take care of the rest.

The main difference between REF and PROD is that in PROD we have a much larger data to process and therefore, the jobs that run on the hadoop cluster take longer to complete and we may have a larger number of concurrent oozie workflows running. So, I see the importance of setting the max active conn accordingly (oozie.service.JPAService.pool.max.active.conn). I currently have it at 50, but do you have a recommendation on the ideal value for that? How do you determine what number is good, like not too small but not too large?

If you want to configure your Oozie server to check for available input dependencies more frequently, you can reduce the "oozie.service.coord.input.check.requeue.interval" (default is 60 sec). Though it will result in more memory usage (oozie queue) and network usage (requests to NN), but it might make your actions start sooner.

What does the timeout attribute do (oozie.service.coord.normal.default.timeout)? It's currently set at 120 (minutes).

This is the timeout for a coordinator action input check (in minutes) for normal job. But the default value is pretty high, so unless you set a smaller non-default, this is not to worry about.

How the throttle attributes affect the way coordinators launch new workflows?
I'm talking about the attributes oozie.service.coord.default.throttle (12) and oozie.service.coord.materialization.throttling.factor (0.05). Are there any other attributes I could or should use that are related to materialization?

oozie.service.coord.default.throttle (12) controls how many actions per coordinator can be in state WAITING concurrently. WAITING is when the input dependency checks occur. The "materialization.throttling.factor" is similar, but this is a function (percentage) of your queue size. This makes more sense in a multi-tenant environment when you don't want all of your Oozie command queue getting filled up only one user's job.


Also, would you elaborate a little more on how I can control the materialization so that my coordinators won't get stuck like it's happening every once in a while in my PROD environment?


How should I set those attributes to cause coordinators to do things like these:
- Always launch new jobs (workflows) if their nominal time is reached and there's room (max concurrency not reached yet).
- Launch most current jobs first (execution=LIFO)

One of the coordinator <control><execution-order> tags. Set it to LIFO. Possible values are

* FIFO (oldest first) default
* LIFO (newest first)
* LAST_ONLY (discards all older materializations)

- Don't create a bunch of WAITING jobs. I don't care about WAITING (future) jobs, but just READY ones, i.e. nominal time is reached (or about to be reached).

Jobs will go to WAITING first, have their input dependencies checked, and then become READY. For this case (to avoid stuck jobs, ok with fewer jobs but READY more quickly) decrease your throttle values and decrease input check requeue interval (not too much) to have actions addressed faster.

- Don't leave actions in the PREP state forever. If they can't start for any reason, either retry or get them out of the way (FAIL, KILL, whatever). Whenever an action is left in the PREP state, one of the concurrency slots is blocked and if several actions get in the same scenario, pretty soon the coordinator will get stuck with no more room to launch new tasks.

Actions will not block concurrency slots in PREP (PREP just means action id persisted in database).

Let me know if the above steps work for you. Happy to help.



Thank you.
Eduardo.



________________________________
From: Mona Chitnis <ch...@yahoo-inc.com>>
To: "user@oozie.apache.org<ma...@oozie.apache.org>" <us...@oozie.apache.org>>; Eduardo Afonso Ferreira <ea...@yahoo.com>>
Sent: Thursday, September 27, 2012 6:25 PM
Subject: Re: Action stuck in PREP state.
Hi Eduardo,

If your PROD environment has jobs that are more database-intensive, can you check/increase your oozie server settings for the following

*   oozie.service.JPAService.pool.max.active.conn
*   oozie.service.coord.normal.default.timeout

Other properties to check

*   oozie.command.default.lock.timeout
*   If materialization window value is large (you want more coord actions to get materialized simultaneously), but the throttling factor is low, then your actions will stay in PREP

Your log errors are pointing towards transaction-level problems. Can you elaborate a bit more on the difference between your REF and PROD environments?

--
Mona Chitnis



On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira" <ea...@yahoo.com>> wrote:

Hi there,

I've seen some posts about this problem, but I still could not determine what causes it and what is the fix for it.

I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3) until this morning on a VM running Ubuntu 10.04.3 LTS.
The database is MySQL running on another VM, same Ubuntu version, MySQL server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I connect).

I have coordinators launching workflows with frequency=3, concurrency=2. 5 to 10 Coordinators.

My workflows run 2-3 actions each, java, pig, shell (python). Nothing too heavy.


This morning I upgraded Oozie to version 3.2.0 built from the stable branch I downloaded from here (http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).

I ran this version for at least one week, maybe two in a REF environment without any problems, but I'm having issues in PROD.

I see connection issues to MySQL, timeouts, workflow actions getting stuck in PREP state.

Do you guys know what could be causing this problem? Anything I may have missed on the PROD environment?

Related to the problem, I see on the oozie.log file it displays the following:


2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]
2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobUpdateJPAExecutor]
2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended with an active transaction, rolling back
2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]


Actions that complete the processing perform other operations before releasing the lock listed on the last line above. I suspect something is failing before that, but I don't see a log message indicating what happened.

If you have insights on this problem, please help me.

Thank you.
Eduardo.

Re: Action stuck in PREP state.

Posted by Eduardo Afonso Ferreira <ea...@yahoo.com>.
Hey, Mona,

The list of jobs in the PROD environment is basically the same as in REF.

When you mentioned "more database-intensive" I assume you're referring to the communication with the Oozie DB and in that case, nothing is different. My jobs don't do anything extra communication with the Oozie DB. I just submit a handful of coordinators to Oozie server and let Oozie take care of the rest.

The main difference between REF and PROD is that in PROD we have a much larger data to process and therefore, the jobs that run on the hadoop cluster take longer to complete and we may have a larger number of concurrent oozie workflows running. So, I see the importance of setting the max active conn accordingly (oozie.service.JPAService.pool.max.active.conn). I currently have it at 50, but do you have a recommendation on the ideal value for that? How do you determine what number is good, like not too small but not too large?

What does the timeout attribute do (oozie.service.coord.normal.default.timeout)? It's currently set at 120 (minutes).

How the throttle attributes affect the way coordinators launch new workflows?
I'm talking about the attributes oozie.service.coord.default.throttle (12) and oozie.service.coord.materialization.throttling.factor (0.05). Are there any other attributes I could or should use that are related to materialization?


Also, would you elaborate a little more on how I can control the materialization so that my coordinators won't get stuck like it's happening every once in a while in my PROD environment?


How should I set those attributes to cause coordinators to do things like these:
- Always launch new jobs (workflows) if their nominal time is reached and there's room (max concurrency not reached yet).
- Launch most current jobs first (execution=LIFO)
- Don't create a bunch of WAITING jobs. I don't care about WAITING (future) jobs, but just READY ones, i.e. nominal time is reached (or about to be reached).
- Don't leave actions in the PREP state forever. If they can't start for any reason, either retry or get them out of the way (FAIL, KILL, whatever). Whenever an action is left in the PREP state, one of the concurrency slots is blocked and if several actions get in the same scenario, pretty soon the coordinator will get stuck with no more room to launch new tasks.



Thank you.
Eduardo.



________________________________
 From: Mona Chitnis <ch...@yahoo-inc.com>
To: "user@oozie.apache.org" <us...@oozie.apache.org>; Eduardo Afonso Ferreira <ea...@yahoo.com> 
Sent: Thursday, September 27, 2012 6:25 PM
Subject: Re: Action stuck in PREP state.
 
Hi Eduardo,

If your PROD environment has jobs that are more database-intensive, can you check/increase your oozie server settings for the following

*   oozie.service.JPAService.pool.max.active.conn
*   oozie.service.coord.normal.default.timeout

Other properties to check

*   oozie.command.default.lock.timeout
*   If materialization window value is large (you want more coord actions to get materialized simultaneously), but the throttling factor is low, then your actions will stay in PREP

Your log errors are pointing towards transaction-level problems. Can you elaborate a bit more on the difference between your REF and PROD environments?

--
Mona Chitnis



On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira" <ea...@yahoo.com>> wrote:

Hi there,

I've seen some posts about this problem, but I still could not determine what causes it and what is the fix for it.

I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3) until this morning on a VM running Ubuntu 10.04.3 LTS.
The database is MySQL running on another VM, same Ubuntu version, MySQL server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I connect).

I have coordinators launching workflows with frequency=3, concurrency=2. 5 to 10 Coordinators.

My workflows run 2-3 actions each, java, pig, shell (python). Nothing too heavy.


This morning I upgraded Oozie to version 3.2.0 built from the stable branch I downloaded from here (http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).

I ran this version for at least one week, maybe two in a REF environment without any problems, but I'm having issues in PROD.

I see connection issues to MySQL, timeouts, workflow actions getting stuck in PREP state.

Do you guys know what could be causing this problem? Anything I may have missed on the PROD environment?

Related to the problem, I see on the oozie.log file it displays the following:


2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]
2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobUpdateJPAExecutor]
2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended with an active transaction, rolling back
2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]


Actions that complete the processing perform other operations before releasing the lock listed on the last line above. I suspect something is failing before that, but I don't see a log message indicating what happened.

If you have insights on this problem, please help me.

Thank you.
Eduardo.

Re: Action stuck in PREP state.

Posted by Mona Chitnis <ch...@yahoo-inc.com>.
Hi Eduardo,

If your PROD environment has jobs that are more database-intensive, can you check/increase your oozie server settings for the following

 *   oozie.service.JPAService.pool.max.active.conn
 *   oozie.service.coord.normal.default.timeout

Other properties to check

 *   oozie.command.default.lock.timeout
 *   If materialization window value is large (you want more coord actions to get materialized simultaneously), but the throttling factor is low, then your actions will stay in PREP

Your log errors are pointing towards transaction-level problems. Can you elaborate a bit more on the difference between your REF and PROD environments?

--
Mona Chitnis



On 9/27/12 3:05 PM, "Eduardo Afonso Ferreira" <ea...@yahoo.com>> wrote:

Hi there,

I've seen some posts about this problem, but I still could not determine what causes it and what is the fix for it.

I have been running Oozie 2.3.2 from Cloudera's package (2.3.2-cdh3u3) until this morning on a VM running Ubuntu 10.04.3 LTS.
The database is MySQL running on another VM, same Ubuntu version, MySQL server version 5.1.63-0ubuntu0.10.04.1-log (as displayed by mysql when I connect).

I have coordinators launching workflows with frequency=3, concurrency=2. 5 to 10 Coordinators.

My workflows run 2-3 actions each, java, pig, shell (python). Nothing too heavy.


This morning I upgraded Oozie to version 3.2.0 built from the stable branch I downloaded from here (http://incubator.apache.org/oozie/Downloads.html), (06-Jun-2012 18:43).

I ran this version for at least one week, maybe two in a REF environment without any problems, but I'm having issues in PROD.

I see connection issues to MySQL, timeouts, workflow actions getting stuck in PREP state.

Do you guys know what could be causing this problem? Anything I may have missed on the PROD environment?

Related to the problem, I see on the oozie.log file it displays the following:


2012-09-27 13:39:00,403 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Acquired lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]
2012-09-27 13:39:00,404 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Load state for [0000173-120927111953690-oozie-oozi-W]
2012-09-27 13:39:00,403 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobUpdateJPAExecutor]
2012-09-27 13:39:00,404 DEBUG JPAService:548 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Executing JPAExecutor [WorkflowJobGetJPAExecutor]
2012-09-27 13:39:00,405  WARN JPAService:542 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor [WorkflowJobGetJPAExecutor] ended with an active transaction, rolling back
2012-09-27 13:39:00,405 DEBUG ActionStartXCommand:545 - USER[aspen] GROUP[-] TOKEN[] APP[ad_counts-wf] JOB[0000173-120927111953690-oozie-oozi-W] ACTION[-] Released lock for [0000173-120927111953690-oozie-oozi-W] in [action.start]


Actions that complete the processing perform other operations before releasing the lock listed on the last line above. I suspect something is failing before that, but I don't see a log message indicating what happened.

If you have insights on this problem, please help me.

Thank you.
Eduardo.