简体   繁体   English

Azure 逻辑应用表插入导致错误

[英]Azure logic app table insertions causing errors

We recently started working on Azure logic app (Standard) and ran into some problems when inserting some data to a normal Azure Table Storage.我们最近开始研究 Azure 逻辑应用程序(标准),并在将一些数据插入普通 Azure 表存储时遇到了一些问题。

Service : Azure logic app (Standard)服务:Azure 逻辑应用程序(标准)

Function that are failing : Insert or Update Entity (Table storage) Function 失败:插入或更新实体(表存储)

Error message : {"statusCode":"InternalServerError","body":{"code":"ServiceProviderActionFailed","message":"The service provider action failed with error code 'ServiceOperationFailed' and error message 'Object reference not set to an instance of an object.'."}}错误消息{"statusCode":"InternalServerError","body":{"code":"ServiceProviderActionFailed","message":"The service provider action failed with error code 'ServiceOperationFailed' and error message 'Object reference not set to an instance of an object.'."}}

The objects that are beeing passed to the function all have the same structure, however, some of them are failing and returning the error written above.传递给 function 的对象都具有相同的结构,但是,其中一些对象失败并返回上面写的错误。

After debugging for a while we concluded that the Managed Identity was the problem.调试了一段时间后,我们得出结论, Managed Identity是问题所在。 When switching to a normal Connection-string to the table storage, the function worked fine and all the data was submitted.当切换到表存储的正常连接字符串时,function 工作正常,所有数据都已提交。

The function is at the moment in Preview mode, so there maybe still are some unknown bugs with it. function 目前处于预览模式,因此可能仍然存在一些未知的错误。

As far as I can tell, it's a combination of using Managed Identity with the built-in Logic App Actions for performing operations on Storage Tables, at least in its current state. If you use the " non built-in " actions you won't see this issue.据我所知,它是将托管身份内置逻辑应用程序操作结合使用以对存储表执行操作,至少在其当前 state 中是这样。如果您使用“非内置”操作,您将不会看不到这个问题。

I saw the same issue the last few days, and in my case my logic apps were merely getting entities rather than inserting.最近几天我看到了同样的问题,在我的例子中,我的逻辑应用程序只是获取实体而不是插入。 The error in question showed up completely non deterministically, sometimes a payload worked, sometimes the same payload got this error.有问题的错误完全不确定地出现,有时有效负载有效,有时相同的有效负载会出现此错误。 The only deterministic factor was that the same batches of payloads started out working or mostly working, but the more I ran them, the more of this error I got.唯一的确定性因素是同一批次的有效负载开始工作或大部分工作,但我运行它们的次数越多,我得到的错误就越多。

As per your own reply, I tried to temporarily change to a connection string instead of a Managed Identity, and indeed it worked much better, but after changing to the "non built-in" V1 actions (ie not V2 which is in preview), it worked fine.根据您自己的回复,我尝试暂时更改为连接字符串而不是托管身份,实际上它工作得更好,但是在更改为“非内置”V1 操作(即不是预览中的 V2)之后,它工作正常。

In my case, it seems there's some heavier loads where the built-in Actions with Managed Identity simply doesn't cut it.在我的例子中,似乎有一些更重的负载,而带有托管身份的内置操作根本无法解决它。 It's weird that we get a 502 rather than eg 429 which we could act upon properly, but it is what it is.奇怪的是我们得到的是 502 而不是我们可以正确执行的 429,但它就是这样。

The Logic Apps Designer is unfortunately not very obvious in terms of what type of Action you're using.不幸的是,逻辑应用程序设计器在您使用的操作类型方面不是很明显。 You switch between the two types when creating an Action in the Logic Apps Designer by clicking either on the tab "Built-in" or the tab "Azure", and to find the non-built in Storage Tables operations you have to specifically write "azure storage tables" in the search box.通过单击“内置”选项卡或“Azure”选项卡在逻辑应用程序设计器中创建操作时,您可以在两种类型之间切换,并找到非内置存储表操作,您必须专门编写“天蓝色存储表”在搜索框中。 Leave out one of those words and you won't find it.遗漏其中一个词,您将找不到它。

在此处输入图像描述

The Managed Identity was the problem and please log support ticket to microsoft. Managed Identity 是问题所在,请将支持票记录到 Microsoft。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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