0

我的项目(.net 核心)包括一个Azure 函数(~3)以及一个 Azure 存储帐户(Blob)。目前,当通过Azure 表单识别器 API从存储帐户处理我的 blob 时,我通过 Application Insights 收到以下错误:

AI (Internal): [Azure-Core] ERROR: Exception in Command Processing for EventSource Azure-Core: An instance of EventSource with Guid 44cbc7c6-6776-5f3c-36c1-75cd3ef19ea9 already exists.

如果该函数在我的开发环境 (Visual Studio 2019) 中本地运行,则一切正常,通过我的 local.settings.json 我已经使用相同的 Azure 表单识别器 API 以及相同的 Azure 存储帐户。因此,只有我的 Function 运行时的操作不同。一次通过 Visual Studio 在本地部署,一次部署到我的 Azure Function (~3)。

我使用我的包的以下配置:

<PackageReference Include="Azure.AI.FormRecognizer" Version="3.1.0-beta.4" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.18.0" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.11" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="4.4.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">

我的 Azure 函数 (~3) 示例:

        public static async Task RunAsync(
        [TimerTrigger("0 00 08 * * 1-5")] TimerInfo myTimer,         
        [Blob("%IncomingContainer%", FileAccess.ReadWrite, Connection = "myStorageAccountString")]
        CloudBlobContainer incomingContainer,
        [Blob("%AnalysedContainer%", FileAccess.ReadWrite, Connection = "myStorageAccountString")]
        CloudBlobContainer analysedContainer,                        
        ExecutionContext context,
        ILogger log)
    {
        // do stuff via Azure Form Recognizer API
    }

有没有人有同样的经历?过去有这个问题,这里的解决方法可以帮助删除现有的 Azure Function 并再次部署它。不幸的是,类似的帖子对我没有帮助。

4

1 回答 1

0

谢谢RohitRanjanMS。发布您的建议作为帮助其他社区成员的答案。

Azure.Storage.Blobs并且Azure.Identity内部依赖于Azure.Core. 您需要更新Azure.Storage.BlobsAzure.Identity使用最新版本

可以参考AI (Internal): [Azure-Core] ERROR: Exception in Command Processing for EventSource Azure-Core: An instance of EventSource with Guid xxx already exists

于 2021-10-13T11:07:38.410 回答