【问题标题】:服务结构异常
【发布时间】:2022-01-23 16:31:36
【问题描述】:

我有一个正在运行的异步任务,并且该站点是使用服务结构部署的。即使拥有完整的堆栈,我也无法确定问题。我不了解服务结构,因此将不胜感激。 我遇到的例外是

One or more errors occurred. State provider 132846449321299027 is not registered with the state manager


 await ServiceFabricClient.functionname(some parameters).ConfigureAwait(false)

异常的堆栈是

System.AggregateException:   at Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient`1+<InvokeWithRetryAsync>d__24`1.MoveNext (Microsoft.ServiceFabric.Services, Version=6.0.0.0, Culture=neutral) Inner exception System.InvalidOperationException handled at Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient`1+<InvokeWithRetryAsync>d__24`1.MoveNext:

【问题讨论】:

标签: c# .net azure azure-service-fabric


【解决方案1】:

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

代替:

await restoreClient.RestoreAsync(id, name).ConfigureAwait(false);

试试这个:

var workerId = StartANewWorker()
JobState jobState;
do {
    //poll for the status of the new worker
    var workerStatus = GetStatusOfTheWorker(workerId);

    await Task.Delay(1000).ConfigureAwait(false);
    if (workerStatus == Failed) {
        throw new Exception("Something went wrong");
    }
} while (workerStatus != Finished);

您可以参考await on async call throws unexpected Timeout exceptionService remoting in C# with Reliable Services

【讨论】:

  • 感谢您的回复。我已经在使用 v2 的服务结构。
  • 如果您的问题已得到解决,您可以接受并投票赞成该答案,以便对可能面临相同问题的其他社区成员有所帮助。
  • 我还没试过。我正在实施它。
猜你喜欢
  • 2015-04-03
  • 1970-01-01
  • 2010-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-10-31
相关资源
最近更新 更多