MetaServlet, runTask, mode=synchronous failing

One Star

MetaServlet, runTask, mode=synchronous failing

We're executing metaServlet via the URL - {TALEND_BOX}:8080/org.talend.administrator/metaServlet, in order to integrate with our external scheduling tool.
Most of the time these tasks run without issue. This particular task runs between 15 and 20 minutes.
Sometimes we receive the following error, near the end of the execution run, but prior to its completion:
{
    "error": "The requested action cannot be carried out because the execution task \"talend process\" is still processing",
    "returnCode": 30
}
According to the metaservlet docs, runTask, returnCode 30 is an "error while launching task".
The TAC disagrees with this assessment and shows the task starting, running, and completing successfully.
The timeline looks like this:

1:29 metaServlet request submitted
1:29 TAC shows execution start up of the task
1:44 metaServlet returns with the above error
1:47 TAC shows that execution has completed successfully

So is there a built-in timeout for a synchronous, metaServlet runTask request?
Moderator

Re: MetaServlet, runTask, mode=synchronous failing

Hi,
Could you please have a look at a KB article about:TalendHelpCenter:Talend Administration Center MetaServlet API documentation to see if it is what you are looking for?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: MetaServlet, runTask, mode=synchronous failing

Sabrina, 
The documentation is unclear on this particular issue. Is there an internal timeout, or undocumented parameter to the runTask action, which would explain this behavior for mode: synchonous?
Joel.
Moderator

Re: MetaServlet, runTask, mode=synchronous failing

Hi Joel,
Are you using Talend Subscription product? Could you please indicate the build version you are using?
Have you already reported a ticket on Talend Support Portal for this particular issue? 
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: MetaServlet, runTask, mode=synchronous failing

Hi Sabrina,
We are using Talend Enterprise Data Quality 5.6.1, in this case. The build is 20141207_1530-V5.6.1. No, I haven't opened a ticket yet. I was hoping to get this resolved here.
If there isn't an answer available, I'll go ahead and have a support case opened.
Joel.
Seventeen Stars

Re: MetaServlet, runTask, mode=synchronous failing

This is an annoying bug in the TAC but it is also an old bug. You can avoid such problems if you use the component tRunTask from Talend exchange. I have created this component to be able to steer task from a job and get the correct exit code back. 
The component deals with such problems - it is not the only one - by rerun requests and check the status of a task again if the response shows errors.
https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&pi=marketplace%252...
It is designed to be used very similar like tRunJob. Check out the documentation. This component has no dependencies to the Talend environment (like the MetaservletCaller script or libraries) because everything is done with casual open source libraries.