Skip to main content
drgenious
Silver ⭐️⭐️⭐️
Jun 21, 2022 6:18 AM UTC
Solved

Retry in oozie through hue

Hi,

I have some schedulers in OOZIE through hue and some of them some times fail. However when I run them manually after, they end successfully. Is there any way to put retry policy in my WFs?

 

Here is the error that I am taking:

Exit code of the Shell command 1
<<< Invocation of Shell command completed <<<

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.oozie.action.hadoop.LauncherAM.runActionMain(LauncherAM.java:410)
at org.apache.oozie.action.hadoop.LauncherAM.access$300(LauncherAM.java:55)
at org.apache.oozie.action.hadoop.LauncherAM$2.run(LauncherAM.java:223)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875)
at org.apache.oozie.action.hadoop.LauncherAM.run(LauncherAM.java:217)
at org.apache.oozie.action.hadoop.LauncherAM$1.run(LauncherAM.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875)
at org.apache.oozie.action.hadoop.LauncherAM.main(LauncherAM.java:141)
Caused by: org.apache.oozie.action.hadoop.LauncherMainException
at org.apache.oozie.action.hadoop.ShellMain.run(ShellMain.java:76)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:104)
at org.apache.oozie.action.hadoop.ShellMain.main(ShellMain.java:63)
... 16 more
Failing Oozie Launcher, Main Class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]
Oozie Launcher, uploading action data to HDFS sequence file: 
Stopping AM

balajip
balajipAnswer
Gold ⭐️
Jun 22, 2022 1:38 AM UTC

Hello @drgenious 

Please use the below line to retry the workflow.

 

<action name="a" retry-max="2" retry-interval="1">

Refer : https://oozie.apache.org/docs/3.3.0/WorkflowFunctionalSpec.html#a18_User-Retry_for_Workflow_Actions_since_Oozie_3.1

 

Let me know if it helps.

4 replies

balajip
Gold ⭐️
balajipAnswer
Gold ⭐️
Jun 22, 2022 1:38 AM UTC

Hello @drgenious 

Please use the below line to retry the workflow.

 

<action name="a" retry-max="2" retry-interval="1">

Refer : https://oozie.apache.org/docs/3.3.0/WorkflowFunctionalSpec.html#a18_User-Retry_for_Workflow_Actions_since_Oozie_3.1

 

Let me know if it helps.

Translate
drgenious
drgeniousAuthor
Silver ⭐️⭐️⭐️
Jun 22, 2022 5:43 AM UTC

Hi @balajip ,

 

Where can I add this in oozie ui(hue)? 

Translate
balajip
Gold ⭐️
Gold ⭐️
Jun 23, 2022 3:13 AM UTC

@drgenious

In hue -> issue workflow -> click gear icon -> retry interval 

Let me know if you have any concerns.

Translate
VidyaSargur
Community Manager
Community Manager
Jul 4, 2022 10:16 AM UTC

@drgenious, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  

Translate
Regards, Vidya Sargur Madabhushi| Senior Community Manager | Was your question answered? Make sure to mark the answer as the Best Answer. If you find a reply useful, say thanks by clicking on the thumbs up button.