Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a job as shown below in the picture. I want the stats and logs to be captured in database. I have created the relevant tables for stats, logs and flowmeter as per the schema of tstatcatcher, tflowmetercatcher, tlogcatcher.
I have enabled the project setting to use the database to capture these information
However, even though I have connected the tlogcatcher to tmysqloutput and have purposefully introduced an error, the error is not caught by tlogcatcher and is not flowing to database as well
Any ideas on this?
Thanks in advance
Rathi
@Xiaodi Shi : I have a similar question: what if I try to output to a db table and my credentials are wrong? I can' put it to work. I have, prejob, parent job calling 4 sequential child jobs and I want to log child errors on that db_table (I have a condition for tMap and it works, if I just use tLogCond instead of tableoutput).
The problem is not with the condition on the tmap, but when the credentials/connection fails, the tDie error message is caught but not printed through tLogCatcher.
I used to have that db output of logCatcher and it worked fine. But now I'm forcing it to fail and can't see how to handle that especial case 😐
This is the log I get with tLogCatcher if the update_fail_log is deactivated (like on the iage above):
Starting job wthr_parent at 13:35 26/01/2021.
Null value will be used for context parameter log_id: For input string: ""
Null value will be used for context parameter etlStartDate: Unparseable date: ""
Null value will be used for context parameter site_cntr: For input string: ""
[statistics] connecting to socket on port 3812
[statistics] connected
Exception in component tSystem_1 (wthr00_snl_hourly_flow_prod)
java.io.IOException: Cannot run program "aws": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at den_dwh_wthr_parent_0_1.wthr_parent.tSystem_1Process(wthr00_snl_hourly_flow_prod.java:5339)
at den_dwh_wthr_parent_0_1.wthr_parent.tPrejob_1Process(wthr00_snl_hourly_flow_prod.java:5259)
at den_dwh_wthr_parent_0_1.wthr_parent.runJobInTOS(wthr00_snl_hourly_flow_prod.java:8212)
at den_dwh_wthr_parent_0_1.wthr_parent.main(wthr00_snl_hourly_flow_prod.java:7812)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 8 more
2021-01-26 13:35:34 [INFO] wthr00_snl_hourly_flow_prod begin
2021-01-26 13:35:34 [INFO] wthr00_snl_hourly_flow_prod.tDie_3 begin
[ERROR] [PREJOB]: Failed retrieving SF ETL credentials from aws param store.
2021-01-26 13:35:34 [ERROR] wthr00_snl_hourly_flow_prod.tDie_3 [ERROR] [PREJOB]: Failed retrieving SF ETL credentials from aws param store.
Job wthr_parent at 13:35 26/01/2021. [exit code=4]
But if I enable that DB output (which won't run because 1st I dont have right credentials, 2nd I have a parent tDie, not a child error thrown):
Starting job wthr_parent at 13:50 26/01/2021.
Null value will be used for context parameter log_id: For input string: ""
Null value will be used for context parameter etlStartDate: Unparseable date: ""
Null value will be used for context parameter site_cntr: For input string: ""
[statistics] connecting to socket on port 4082
[statistics] connected
Exception in component tSystem_1 (wthr_parent)
java.io.IOException: Cannot run program "aws": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.tSystem_1Process(wthr_parent.java:3372)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.tPrejob_1Process(wthr_parent.java:3292)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.runJobInTOS(wthr_parent.java:8472)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.main(wthr_parent.java:8072)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 8 more
2021-01-26 13:50:54 [INFO] wthr_parent begin
2021-01-26 13:50:54 [INFO] wthr_parent.tDie_3 begin
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Talend7.2.1/TOS_DI-Win32-20190620_1446-V7.2.1/configuration/.m2/repository/org/talend/libraries/slf4j-log4j12-1.7.10/6.0.0/slf4j-log4j12-1.7.10-6.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Talend7.2.1/TOS_DI-Win32-20190620_1446-V7.2.1/configuration/.m2/repository/org/talend/libraries/slf4j-log4j12-1.7.5/6.0.0/slf4j-log4j12-1.7.5-6.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
tDie_3 - tDie failed to log message due to internal error: den_dwh_wthr.wthr_parent_0_1.wthr_parent$TalendException
Exception in component tDBOutput_1 (wthr_parent)
java.lang.RuntimeException: Referenced component: tDBConnection_1 not connected
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.tLogCatcher_1Process(wthr_parent.java:2114)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.tDie_3Process(wthr_parent.java:5524)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.tSystem_1_onSubJobError(wthr_parent.java:1095)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.tSystem_1_error(wthr_parent.java:835)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent$TalendException.printStackTrace(wthr_parent.java:722)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent$TalendException.printStackTrace(wthr_parent.java:711)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.runJobInTOS(wthr_parent.java:8479)
at den_dwh_wthr.wthr_parent_0_1.wthr_parent.main(wthr_parent.java:8072)
Job wthr_parent ended at 13:50 26/01/2021. [exit code=4]
Hello,
Are you using a tLogCatcher in your child job or expecting the logs to be caught by a tLogCatcher in your parent job? if you want to stop in loop if child job fails, please select ""Die on Child error". Ideally the failure will be captured by tLogCatcher.
Best regards
Sabrina