Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tRunTask throws Exceptions

Hello All,
we are using the customized component "tRunTask" from cimt ag. The problem is that this component throws exceptions at our customer but in contrast it runs smoothly at our local installation.
Has anybody ideas why this component "tRunTask" has problems with the task id?
Task null: got id for label: DI2012_EXPORT_ORCHESTRATION_PART_1
Exception in component tRunTask_1
java.lang.IllegalArgumentException: taskId cannot be null or empty
at de.cimt.talendcomp.tac.TaskAction.setTaskId(TaskAction.java:18)
at company.exportstarterjms_a_0_1.ExportStarterJMS_A.tRunTask_1Process(ExportStarterJMS_A.java:3159)
at company.exportstarterjms_a_0_1.ExportStarterJMS_A.tJDBCInput_1Process(ExportStarterJMS_A.java:3059)
at company.exportstarterjms_a_0_1.ExportStarterJMS_A.tJMSInput_1Process(ExportStarterJMS_A.java:2212)
at company.exportstarterjms_a_0_1.ExportStarterJMS_A.runJobInTOS(ExportStarterJMS_A.java:5034)
at company.exportstarterjms_a_0_1.ExportStarterJMS_A.main(ExportStarterJMS_A.java:4446)
Kind regards
Hilderich
 
Labels (4)
20 Replies
Anonymous
Not applicable
Author

The component provides the check if the referred task is currently running and can wait until its own task and other tasks are finished.
I would set the option "Wait until this tasks and none of the tasks in the list are running".
_AnonymousUser
Specialist III
Specialist III

Hi Jlolling,
We are exposing our parent job as a WAR(Web Service) which uses the truntask component.When we invoke the Web Service,its typically takes 3 secs to transfer the control from WAR to a job deployed in Talend Administration center.Is this the normal behaviour or can we reduce this timeframe?
Regards,
Scmal
Anonymous
Not applicable
Author

It depends on the TAC installation. This time gap is unfortunately quite normal. The component does not delay the request it is the TAC what delays the start. I would check the start time of the task in the TAC with the timestamp when the component send the request. For a deeper look into the communication you could switch on the debug flag in the advanced settings of he component.
My experiences is, the TAC will be slower and slower over the time. I suspect some problems with the database e.g. missing indices etc.
If the task does not run so long you could try the synchronise mode.
Anonymous
Not applicable
Author

Hi Jlolling,
We tried invoking a job in tac as a rest service(MetaServlet).Below is the reference link
https://help.talend.com/search/all?query=Calling+the+MetaServlet+REST+Web+service+to+execute+a+task&...
Currently when we try to invoke the service in parallel,only 2 requests run and rest of them fail.Below is the issue snapshot
Can you pls provide us inputs on how truntask is able to handle  15 requests in queue ?
Is it possible to implement the same in Metaservlet?
Regards,
Scmal
Anonymous
Not applicable
Author

The tRunTask component use exact the same communication as the MetaServletCaller. Both are RESTful web service clients but the tRunTask component provides a convenient integration into a Talend job.
The mentioned tREST_1 could only run the job in synchronous mode - means, the response for the request returns if the job has been finished. For long running jobs this design will often fail because of the timeout of http protocol.
Thats because I added in the tRunTask component the asynchronous mode to avoid problem.
You could replace the tREST with the tRunTask - with few changes 😉
If you want to have a queue than you have to implement a queue for your self e.g. with a database table and some status flags which should be updated if a request could successfully started in the TAC.
You could build a job which creates entries in the "queue" table and a job which polls this table for open requests and update the status if the request has been started successfully. In the first place it sounds not so difficultly.
 
Anonymous
Not applicable
Author

Hi Jlolling,
Thanks a lot for your inputs.
Just one more info from you.We are currently using the below metaservlet script in async mode
 GMTtoBST.base64Encode("{\"actionName\":\"runTask\",\"authUser\":\"" + context.TACUser + "\",\"authPass\":\"" + context.TACPassword + "\",\"taskId\":\"" + context.taskId + "\",\"context\":{\"Filetype\":\"" + context.Filetype + "\",\"FileName\":\"" + context.FileName + "\",\"FileUniqueID\":\"" + context.FileUniqueID + "\",\"properties\":\"" + context.properties + "\"},\"mode\":\"asynchronous\"}")
Currently when we invoke this rest service say 10 times in parallel,only two requests are processed and the rest fail(screenshot from my earlier post).Whereas ,when we use the truntask which uses similiar communication strategy is able to hold the requests in Talend Administration center as queue.Can you please help us in  understanding how this is implemented in truntask or how we can do the same in trest component ?
The only concern with truntask is, every time  it takes 3 seconds for TAC to get the control,whereas the above Metaservlet script takes 1 sec.Attaching screenshot of jobs when run using truntask.Waiting for your inputs!! 0683p000009MACn.png

Regards,

  Scmal
Anonymous
Not applicable
Author

At first, the TAC can NOT run one task in parallel multiple times. I am impressed - and actually think about an error - the TAC accepts 2 requests similar.
The tRunTask component checks the status of the target task and waits until the task is ready to run. The component (and also the TAC) does not queue any requests. If you want to queue the requests you have to create your own queue.
I will check some possible reason for a delay but in my environment there is no delay and I use this component in a large project which uses this component heavily.
Probably the check for the status causes the delay. Could you enable the debug flag to get all the communication at the output. It would be great if you could send it to me.
_AnonymousUser
Specialist III
Specialist III

Hi Jlolling,
Need some inputs on why truntask fails for a multiple file processing.
When we process multiple files using truntask,we could find the tasks being queued,but at certain occasions,we could find the error that truntask is NOT READY TO RUN,but as per the component,it should have been in Awaiting Execution.I am attaching the errors below.Could you please help us to resolve this.
 Unable to invoke talend job jB1510 for /data01/Mule/EmbeddedFTP/NETA/Home/netabmrs_ftp_user1/XML/netabmrs_ftp_user1_48X000000000001I-NGET-PUGU-00001122-1.xml. ( FileUniqueID= 28bc8d3c-68cc-11e4-9d69-f16f79d22cf9);4
2014-11-10 11:24:42;JJlLuu;JJlLuu;JJlLuu;BMRS;jInvokeTalendJob;Default;6;Java Exception;tRunTask_5;java.lang.Exception:Task:101 is not not ready to run. Status ENDING_SCRIPT ErrorStatus:NO_ERROR;1
2014-11-10 11:24:44;eoH9d2;eoH9d2;eoH9d2;BMRS;jInvokeTalendJob;Default;5;tDie;tDie_1; Unable to invoke talend job jB1520 for /data01/Mule/EmbeddedFTP/NETA/Home/netabmrs_ftp_user1/XML/netabmrs_ftp_user1_48X000000000005A-NGET-AAGU-00000001-3.xml. ( FileUniqueID= 2b5bf031-68cc-11e4-9d69-f16f79d22cf9);4
Regards,
Scmal
Anonymous
Not applicable
Author

hi Jlolling?
Any help on the above pls?
Regards,
Scmal
Anonymous
Not applicable
Author

Hi, yes the current release of the component expects a task which is ready to run.
I would suggest you activate the option "Wait until task has been finished".
The status ENDING_SCRIPT is new for me. Which release of Talend do you run.
I am working on a new release which an receive the new job return code feature of Talend 5.6 and change the way the component currently works. I going to replace the current state machine with a new one.
I am planning to finish it in December.
Because of the lack of performance in triggering task via the web service I usually use following architecture to proceed multiple files:
1. a worker job, wich process one file
2. a iterator job wich iterates through the files and calls the worker job (e.g. with tRunJob and in parallel)
3. a trigger job which checks multiple criteria necessary to run the iterator job e.g. it checks some prerequisitions and if files are present
Mostly I create one trigger job for multiple iterator tasks.
At the moment I would strongly suggest avoid expecting fast task calls via the TAC web service (it is not a matter of the component tRunTask!)