One Star

[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
 
20 REPLIES
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

It looks like there is a bug in the components error handling. Are you sure the Task (with case sensitive label!!) exists - please do not think about the job name! 
Could you please show me the configuration of the component?
I guess in the customer environment the component runs in a task build by the commandline?
I have often the problem with the command line because the commandline knows 2 different sources for user components:
1. the user component path
2. the components directory under the project. 
If you have deployed one of the first releases and use a Talend release older the 5.3 you will experience a strange behaviour of the commandline:
The commandline commits (!) the user components into the project components directory. If you update the component in the user component directory this update will be shadowed with now old release in the project components dir.
My way to solve that is to delete (and commit this deletion) the components in the project/components dir.
On the commandline:
1. stop the commandline (and check if the commandline is not running anymore!!)
2. delete the dir commandline-workspace
3. start the commandline (the deleted dir will be recreated automatically)
One Star

Re: [resolved] tRunTask throws Exceptions

Hello jLolling,
Many thanks for your answer. The customer has as we do the TAC in use and we are not in touch
with its underlying commandline. We have desigend and tested the DI Jobs and the customer tries to install
theses jobs via its own TAC over a shared SVN. But that doesn't work because the component tRunTask
makes troubles. Enclosed you find a screenshot of the TAC that gives you the evidence that the job label
corresponds to the component configuration.
We use Talend 5.3.1 all the way through.
I have looked into the commandline view inside TAC and there is an entry about customer components
(see screenshot below). There is stated a path for customer components and when I look into it I can
see the tRunTask component. I can also find the component in
~/Talend-5.3.1/cmdline/studio/commandline-workspace/<project>/components/
That means it is not the problem you supposed.
Kind regards,
Hilderich
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

Hi Hilderich,
because of the screenshot I could say the task is correct but you would receive a meaningful message if this would be the case.
Indeed the terrible behaviour to commit component into the project dir and read them at last causes often problems. This bug is actually solved I guess in 5.4.
I suggest you delete the content of the dir ~/Talend-5.3.1/cmdline/studio/commandline-workspace/<project>/components/ 
in SVN (/<PROJECT>/trunc/components/) and repeat the commandline reset.
Another approach could be commit the new release of the component into the project component dir (with the project settings dialog). This way you avoid this problem. But this causes sometimes the problem the components will not loaded by the commandline. It is a nightmare !
If you mind, we can make a webex session to get it solved. Contact me per email: jan.lolling@gmail.com.
Best regards
Jan Lolling
One Star

Re: [resolved] tRunTask throws Exceptions

Hello Jan,
That is very kind of you to provide us your help via webex session - many thanks for that.
Fortunately I logged on to the customer's TAC and there I have generated, deployed and run the DI Job again and now it works!?
Previously the customer did this. I don't know what happend differently.
Thank you for your hints regarding customized components and its location.
Kind regards
Hilderich
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

Great to hear! In the upcoming release of Talend 5.6 the TAC will provide much better information about the job error code and the check for the task status will be much more reliable because I do not have to deal with unrelated stats anymore.
I would wait until 5.6.2 before start using it - you know the Talend maturation time ;-)
One Star

Re: [resolved] tRunTask throws Exceptions

Hi Jlolling,
We are currently facing an issue when we use truntask.It would be very helpful if you can help us resolve this.
the truntask fails intermittently when we try to trigger multiple jobs.
For eg: we will be exposing our job as a web service,the job contains the truntask component.
When we trigger multiple instances of the job at the same time,we get the below exception and one our job does not run.
Task 277: got id for label: jB0610
Task jB0610: Own task is currently started or running. Wait for its end.
Task jB0610: All precondition tasks has been finished.
05:32:22.777# Task jB0610 starting ...
{"actionName":"runTask","authUser":"admin@company.com","authPass":"admin","taskId":"277","context":{"Filetype":"1","FileName":"/data01/Mule/EmbeddedFTP/NE45/Home/ne45bmrs_ftp_user1/XML/NGET-EMFIP-ATL8.xml","FileUniqueID":"1b1e3432-22d5-11e4-848e-31d6936bf221","properties":"/data01/Talend-5.4.1/XSDFiles/Phase1context.txt"},"mode":"asynchronous"}
Exception in component tRunTask_5
java.lang.Exception: Server error:The requested action cannot be carried out because the execution task
        at de.cimt.talendcomp.tac.TACAction.executeRequest(TACAction.java:133)
        at de.cimt.talendcomp.tac.RunTask.execute(RunTask.java:32)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.tRunTask_5Process(jInvokeTalendJob.java:5032)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.tMysqlInput_1Process(jInvokeTalendJob.java:4746)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.tMysqlRow_1Process(jInvokeTalendJob.java:3699)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.tMysqlRow_7Process(jInvokeTalendJob.java:3577)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.tMysqlInput_3Process(jInvokeTalendJob.java:3312)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.tMysqlConnection_1Process(jInvokeTalendJob.java:3006)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.runJobInTOS(jInvokeTalendJob.java:13813)
        at bmrs.jinvoketalendjob_1_0.jInvokeTalendJob.runJob(jInvokeTalendJob.java:13338)
        at sun.reflect.GeneratedMethodAccessor408.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.QSMethodHandler.invokeEndpointFromGet(QSMethodHandler.java:129)
        at org.apache.axis.transport.http.QSMethodHandler.invoke(QSMethodHandler.java:94)
        at sun.reflect.GeneratedMethodAccessor407.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226)
        at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
 Unable to invoke talend job jB0610 for /data01/Mule/EmbeddedFTP/NE45/Home/ne45bmrs_ftp_user1/XML/NGET-EMFIP-ATL8.xml. ( FileUniqueID= 1b1e3432-22d5-11e4-848e-31d6936bf221)
/data01/Mule/EmbeddedFTP/NE45/Home/ne45bmrs_ftp_user1/XML/NGET-EMFIP-ATL9.xml
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

This is an error message from the TAC server. The request to run the task was successfully received (thats the purpose of my component) but cannot carried out because ... ok here we are missing the actual problem. 
I have never seen such error and it looks like the TAC is self has a problem. Could you start the task with in the TAC webapp?
Could you please try to run this task with the MetaServletCaller (my component tRunTask uses the same communication methods like the Talend provided MetaServletCaller.
One Star

Re: [resolved] tRunTask throws Exceptions

t8UbJV <a href="">ngrgsseyzeca</a>, dddhervhcbgk, hxbuscelmylo,
One Star

Re: [resolved] tRunTask throws Exceptions

Hi jlolling,
Thank you very much for responding..
We are currently facing this issue when we run try to invoke the job multiple times(say 15 times parallely at a single time).
So what happens is ,the jobs in TAC are invoked one by one, and intermittently as you said one the job gets triggeref but fails to run.Since we are invoking it 15 times,other instance of it starts running and we receive the above exception for the job that did not run.
Is there any way to handle this exception?
we will not be able to run the job multiple times at a single time using metaservlet.
Regards,
Scmal
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

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".
One Star

Re: [resolved] tRunTask throws Exceptions

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
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

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.
One Star

Re: [resolved] tRunTask throws Exceptions

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
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

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.
 
One Star

Re: [resolved] tRunTask throws Exceptions

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!! Smiley Happy

Regards,

  Scmal
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

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.
One Star

Re: [resolved] tRunTask throws Exceptions

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
One Star

Re: [resolved] tRunTask throws Exceptions

hi Jlolling?
Any help on the above pls?
Regards,
Scmal
Seventeen Stars

Re: [resolved] tRunTask throws Exceptions

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!)
One Star

Re: [resolved] tRunTask throws Exceptions

Hi jlolling,
I'm using the tRunTask component a lot and it made my life so much easier. Now I ran into a problem for the first time, when I tried to trigger a job via tRunTask that belongs to a project with no storage set. The component says it cannot find the jobs. Is it neccessary for the project to be in the SVN for tRunTask to be able to find the jobs? Or is it just a strange coincidence?
*edit* I found the solution. The user didn't have the needed rights for the project. Now everything is running as expected. Thanks for that great component !!!