1

I am running into a problem of a task exiting with a null exit code. And with this exit code, I noted that I can't access files on node to check the stderr and stdout files. What could be the problem? Also, what does a null exit code mean and how can I set the exit code to be not nullin case of failure?

Thanks!

J.B
  • 137
  • 2
  • 16

1 Answers1

1

You will want to check the task's failureInfo field within the executionInfo property.

There is a difference between task failure and application logic failure for the process (command to execute) that is executed under the task. A task failure can be a multitude of things such as a resource file for a task failing to download. A process failing to launch properly for some reason is also a task failure. However, if the process does launch and execute, but the process itself "fails" (as per application logic) and returns a non-zero exit code and no other issues are encountered with the task, this task will have the proper exit code saved. Thus, if a task completes with a null exit code, you will need to consult the failureInfo field as per above along with any stdout/stderr logs if they exist.

fpark
  • 2,304
  • 2
  • 14
  • 21
  • I am getting an error of BlobAccessDenied. I am suspecting that there was an error getting the application package required to run the task. It doesn't seem that the task runs in the node since I can't find the stdout/stderr logs. Do you think that could be the problem? If yes, is there a way to check if getting the application package from storage was successful? – J.B Jul 19 '17 at 20:24
  • `BlobAccessDenied` will prevent the process command from executing. Do you have any resource files specified on the task? – fpark Jul 19 '17 at 20:27
  • I don't have resource files, but I have an application package. I am basically creating a job with a jobmanager task that is supposed to get its executables from an application package. My guess right now is that application packages in a VM configuration are not supported for the JobManagerTask because there isn't an option in the portal and I keep getting this error when I add a package to the job manager task programmatically. Is that true? Are application packages supported for job manager task in a VM configuration? – J.B Jul 19 '17 at 20:34
  • Application Packages and JobManager tasks on VM configuration should work. `BlobAccessDenied` with an Application Package seems highly unusual - you may need to raise a support ticket in the Azure Portal with your Batch account, region, pool id, job id and approx. time of issue. – fpark Jul 19 '17 at 21:05
  • application packages worked for me on VM configuration with tasks other than the JobManagerTask. It seems that this was the problem because I didn't get the error when I switched from application packages to resource files. Considering that application packages just recently got rolled up to VM configuration, I wonder if that's what causing them not to work with JoManagerTask specifically. – J.B Jul 19 '17 at 21:21
  • My guess is that there may be an issue in the service - you'll probably need to get support to look at the issue as per above. – fpark Jul 19 '17 at 21:24
  • Thanks! I'll do! I started having this error with other tasks as well, so it may be not a jobmanager task thing, most probably something with the service as you said. – J.B Jul 20 '17 at 00:54