Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
in tRunJob ,Please check if "Die on Child error" option is selected.
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.
If I'm not looping the child job then it does work. Are you looping your child job and getting an email message?
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?
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.
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.