【问题标题】:Errors when running any stateful service on local cluster在本地集群上运行任何有状态服务时出错
【发布时间】:2016-06-06 20:39:02
【问题描述】:

在 Windows 8.1 上运行 Service Fabric 4.4.87.9494

我可以在本地集群上成功部署和运行无状态服务或有状态或无状态参与者,但是当我尝试部署有状态服务时,我在 Service Fabric Explorer 中收到以下错误:

Event    Warning    Unhealthy event: SourceId='System.RA', Property='ReplicaOpenStatus', HealthState='Warning', ConsiderWarningAsError=false.
Replica had multiple failures during open. Error = System.IO.FileNotFoundException (-2147024894)
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
    at System.Fabric.Data.Log.Interop.NativeLog.IKPhysicalLogManager.EndOpenLogContainer(IFabricAsyncOperationContext Context, IKPhysicalLogContainer& Result)
    at System.Fabric.Data.Log.Interop.PhysicalLogManager.<OpenLogContainerAsync>b__5(IFabricAsyncOperationContext Context)
    at System.Fabric.Interop.AsyncCallOutAdapter2`1.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously)
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Fabric.Data.Log.LogManager.<OnOpenPhysicalLogAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Replicator.KtlLogManager.<OpenPhysicalLogAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Replicator.KtlLogManager.<CreateLogFileAsync>d__c.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Replicator.LogManager.<OpenAsync>d__4.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    at Microsoft.ServiceFabric.Replicator.LoggingReplicator.<OpenAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Replicator.DynamicStateManager.<OpenAsync>d__2b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Replicator.TransactionalReplicator.<OpenAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Replicator.StatefulServiceReplica.<System.Fabric.IStatefulServiceReplica.OpenAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.ServiceFabric.Services.Runtime.StatefulServiceBase.<System.Fabric.IStatefulServiceReplica.OpenAsync>d__0.MoveNext()

无论我使用 Visual Studio 创建默认的有状态服务,还是使用入门存储库中的任何示例,或者将有状态服务添加到现有应用程序,我都会看到相同的错误。无论我是使用 Visual Studio 部署它还是运行 Powershell 命令,都会发生同样的事情。但是,如果我将相同的应用程序部署到 Azure,一切都很好。

我已经在其他两台 Windows 8.1 计算机上进行了尝试,结果相同,但是我在我的家用计算机(Windows 10)上进行了尝试,但没有发现问题。这表明它可能是组策略中的某些东西正在影响事物。我查看了由此产生的组策略,但找不到任何我认为可能导致此类问题的东西。我也尝试在部署期间禁用病毒检查器。

我尝试使用 Process Monitor 找出它正在寻找的文件,但找不到任何明显的东西。

非常感谢任何有关如何推进这一点的指示。我想让团队全部启动并运行,如果我们不能创建有状态服务,我就做不到!

【问题讨论】:

    标签: azure azure-service-fabric


    【解决方案1】:

    这可能是 4.4 版中的错误。请升级到 4.5 版,因为这将需要修复。

    【讨论】:

    • 谢谢。我已经测试并确认它在 v.4.5 中可以正常工作
    猜你喜欢
    • 2019-10-24
    • 2018-03-30
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 2017-10-15
    • 2018-09-19
    • 1970-01-01
    • 2020-04-12
    相关资源
    最近更新 更多