【问题标题】:Service Fabric - 'System.Replicator' reported Warning for property 'RemoteReplicatorConnectionStatus'. Replica xyz cannot be reachedService Fabric -“System.Replicator”报告了属性“RemoteReplicatorConnectionStatus”的警告。无法访问副本 xyz
【发布时间】:2020-07-05 08:37:44
【问题描述】:

错误是

'System.Replicator' reported Warning for property 'RemoteReplicatorConnectionStatus'.
Replica 132295460844367404 cannot be reached to start the copy process. Error Code: CannotConnect, Target listen address: localhost:62352/5298ce62-a8b6-4c10-944c-ce861fb5abd9-132295460844367404;70bcec58-3f57-4a23-b787-7353d53e631d:fdd277399fb82af80e7f8a0f097d244d. Verify that ReplicatorAddress config is valid.

有 3 个副本,其中 2 个被卡在 InBuild 中。错误报告来自主副本,并且它抱怨的replicaId 是卡在InBuild 中的辅助副本之一。

我在此错误中发现的所有内容都与独立集群有关,但我的集群是 Azure 生成的。这个错误的一些原因是什么?仅当我部署多个副本时,我的有状态服务才会发生这种情况。

在主副本事件中,其他 2 个副本中的每一个都显示以下错误

 "Description": "The api IReplicator.BuildReplica(132295460844367404) on node _default_4 is stuck. Start Time (UTC): 2020-03-24 17:55:24.215.",

如果我将副本计数设置为 1,则不会出现错误,直到我尝试升级应用程序,此时它创建了一个空闲副本以进行交换,并在此时卡在此错误上,导致升级无限期挂起。

可以将相同的应用程序部署到我的本地 5 节点集群而没有错误。

【问题讨论】:

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


    【解决方案1】:

    我开始注释代码以查看是否可以达到它正在工作的状态,并最终将其缩小到我覆盖复制器设置的方式。

    我正在这样做

    public MyStateFulService(StatefulServiceContext context)
    : base(context, new ReliableStateManager(context, new ReliableStateManagerConfiguration(new ReliableStateManagerReplicatorSettings
    {
    MaxReplicationMessageSize = 1073741824
    }))){ }
    

    并将其更改为

    <Section Name="ReplicatorConfig">
        <Parameter Name="ReplicatorEndpoint" Value="ReplicatorEndpoint" />
        <Parameter Name="MaxReplicationMessageSize" Value="524288000" />
        <Parameter Name="MinLogSizeInMB" Value="4096" />
      </Section>
    

    解决了这个问题。我假设我通过创建一个新的 ReliableStateManagerReplicatorSettings 对象来覆盖默认复制器端点

    【讨论】:

      猜你喜欢
      • 2021-09-22
      • 2021-01-24
      • 1970-01-01
      • 2019-07-06
      • 2016-11-25
      • 2015-05-22
      • 2018-01-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多