简体   繁体   中英

Azure Batch Service Task Exit Code error

I downloaded the .NET Tutorial sample to get started with Azure Batch.

My objective is to automate(run every 2 minutes) a web api call and store the data that I get back into a data storage container.

The problem is that the Task that I am executing on my node(VM) in my pool is returning a failure, The Exact error is "the task exited with an exit code representing a failure".

So I went ahead and printed the error exit code that is causing the failure. The exit code is -1073741819. But what does this tell me???? I couldn't find anything online that tells me what this exit code represents??? How to fix it??

Sometimes when I run it again, It fails on another exit code -532462766. How do I debug failures that occur on my VM in the azure cloud?

You can look at the stderr.txt and stdout.txt files for the tasks to gain additional insight into the issue. The easiest way to view these files is to go to the Azure Portal and navigate to your Batch account. You can click on Jobs which will expand the jobs blade. Click on the relevant task and then click on Files on node . You should see both stderr.txt and stdout.txt for viewing. You can also retrieve these files programmatically through the .NET SDK via CloudTask.GetNodeFile/GetNodeFileAsync .

You can also RDP into your compute node and look at the Windows Event Viewer to gain further insight into why your program is crashing. You can generate RDP credentials through the Azure Portal by navigating to the compute node that executed your task (Pools -> Select Pool -> Nodes -> Select Node) and adding a remote user.

As far as your exit code, -1073741819 is C0000005 (appears to be an Access Violation) and -532462766 is E0434352 (appears to be a CLR exception). You will want to do some research into why your code is producing these errors. One sanity check is to ensure that you are packaging all of the required DLLs and assemblies with your program as part of an Application Package or with task resource files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM