【问题标题】:Service Fabric Replica StuckService Fabric 副本卡住
【发布时间】:2018-08-30 22:45:12
【问题描述】:

我正在升级 Service Fabric 上的应用程序,其中一个副本显示以下警告:

不健康事件:SourceId='System.RAP'、Property='IStatefulServiceReplica.ChangeRole(S)Duration'、HealthState='Warning'、ConsideWarningAsError=false。 节点 _gtmsf1_0 上的 api IStatefulServiceReplica.ChangeRole(S) 卡住了。开始时间(UTC):2018-03-21 15:49:54.326。

经过一些调试,我怀疑我没有正确遵守取消令牌。同时,如何安全地强制重启这个卡住的副本以使服务再次运行?

Get-ServiceFabricDeployedReplica的部分结果:

...
ReplicaRole                : ActiveSecondary
ReplicaStatus              : Ready
ServiceTypeName            : MarketServiceType
...
ServicePackageActivationId : 
CodePackageName            : Code
...
HostProcessId              : 6180
ReconfigurationInformation : {
                             PreviousConfigurationRole            : Primary
                             ReconfigurationPhase                 : Phase0
                             ReconfigurationType                  : SwapPrimary
                             ReconfigurationStartTimeUtc          : 3/21/2018 3:49:54 PM
                             }

【问题讨论】:

    标签: azure-service-fabric service-fabric-stateful


    【解决方案1】:

    您也许可以将其直接通过管道传送到Restart-ServiceFabricReplica。如果仍然卡住,那么您应该能够使用Get-ServiceFabricDeployedCodePackageRestart-ServiceFabricDeployedCodePackage 重新启动周围的进程。由于Restart-ServiceFabricDeployedCodePackage 具有选择随机包以模拟故障的选项,因此请确保针对您有兴趣重新启动的特定代码包。

    【讨论】:

    • 是的,请确保您尊重那些取消令牌。它们很重要 ;)
    • 我已牢记这一点,相信我!
    猜你喜欢
    • 2016-11-25
    • 2017-02-20
    • 1970-01-01
    • 1970-01-01
    • 2021-03-04
    • 2019-05-08
    • 2023-03-20
    • 2016-09-28
    • 2016-10-12
    相关资源
    最近更新 更多