Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
rp2018
Creator
Creator

tLogCatcher not catching child job errors

tLogCatcher is not catching errors coming from a child job.

When a job is run it'll show all of the error messages coming from a child job in the Run Window, but it is not catched by tLogCatcher to email.
If we don't loop the child job, tLogCatcher is catching all error messages and emailing.

 

This is a master job:
tjava--->tloop--->tJavaflex--->tJava--->tRunjob--->tjava

NOTE: tRunjob has Die on child error and Use an independent process to run subjob selected

 

This is a child job:
tPrejob--->tRestclient--->tjson--->tSetGlobalvar

NOTE: tRestclient and tJson have Die on error selected

Labels (5)
13 Replies
Anonymous
Not applicable

Are you using a tLogCatcher in your child job or expecting the logs to be caught by a tLogCatcher in your parent job? Can you show a screenshot of the jobs? That might help identify the issue

rp2018
Creator
Creator
Author

0683p000009M1xR.pngParent Job0683p000009M1w5.pngChild Job

akumar2301
Specialist II
Specialist II

in tRunJob ,Please check if "Die on Child error" option is selected.

 

chafer
Contributor
Contributor

I created a Talend 'joblet' for the log catcher as you are showing and drop that into each job, regardless whether it is a parent or child job.  In the case where a child job fails, I get two emails; one for the parent stating a 'child job has failed' and another for the child job which describes the exact error and I include the 'jobName' so that I know which job failed.    

rp2018
Creator
Creator
Author

If I'm not looping the child job then it does work.  Are you looping your child job and getting an email message?

rp2018
Creator
Creator
Author

Here is the screen shot when the child job is not looped it does email the message.  Do I need to add anything inside the loop in order to email the error message? 0683p000009M1ye.png

chafer
Contributor
Contributor

Mine is actually slightly different - I use the tFlowToIterate component from tLogCatcher to iterate each error to an email component - not using the tMap component.   I use the 'message' column from tLogCatcher and pass it to the email component, as the attached image shows in my setup. The code I use in the email's subject and message also shows in this image.  I used the tFlowToIterate component because multiple errors can happen within the same job itself and I needed get an email when each error 'incident' happens.  This works also for tWarn notices that you may want to see but not kill a job, like a using a tWarn to record a count above a certain threshold setting. 


talend_job_error.jpg
akumar2301
Specialist II
Specialist II

if you want to stop in loop if child job fails
select ""Die on Child error".
Ideally failure will be captured by tLogCatcher.

if you want to continue in loop if child job fails

1)Donot select ""Die on Child error"
2) after tRunJob attach a runif condition and check ((Integer)globalMap.get("tRunJob_1_CHILD_RETURN_CODE")) !=0
3) attach it to tWarn

tWarn will be captured in tLogCatcher. Set Warning Message so that you can identify your details before sending mail.
rp2018
Creator
Creator
Author

Abhishek,

 

I do want my child job to die and inside the tRunJob have checked an option Die on child error.  This is not working.