Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 升级到SDK 2.3.301后,服务结构参与者或服务随机变得不可访问_C#_Azure_Visual Studio 2015_Azure Service Fabric_Service Fabric Stateful - Fatal编程技术网

C# 升级到SDK 2.3.301后,服务结构参与者或服务随机变得不可访问

C# 升级到SDK 2.3.301后,服务结构参与者或服务随机变得不可访问,c#,azure,visual-studio-2015,azure-service-fabric,service-fabric-stateful,C#,Azure,Visual Studio 2015,Azure Service Fabric,Service Fabric Stateful,从Service Fabric SDK 2.0.135升级到2.3.301后,我们开始遇到这样的情况:尽管在Service Fabric Explorer中显示为正常,但Service Fabric参与者或服务仍无法访问。一旦处于这种状态,通过ActorProxy或ServiceProxy对actor或服务的任何调用都将挂起5分钟,然后最终发出TimeoutException。一旦进入这种状态,参与者或服务将永远无法自行恢复,即使只剩下一个小时。唯一的解决方案是重置参与者或服务所在的节点、重新部

从Service Fabric SDK 2.0.135升级到2.3.301后,我们开始遇到这样的情况:尽管在Service Fabric Explorer中显示为正常,但Service Fabric参与者或服务仍无法访问。一旦处于这种状态,通过ActorProxy或ServiceProxy对actor或服务的任何调用都将挂起5分钟,然后最终发出TimeoutException。一旦进入这种状态,参与者或服务将永远无法自行恢复,即使只剩下一个小时。唯一的解决方案是重置参与者或服务所在的节点、重新部署参与者或服务(完全相同的EXE)、重置整个群集或重新启动所有群集计算机

它通常在部署或重新部署SF应用程序后进入这种状态

在使用服务结构的最后一年(自SDK v1.3以来),我们从未遇到过这个问题。它只是在移动到2.3.301之后才开始

这似乎是随机和不一致的。我们解决方案中的13个SF应用程序中,哪一个也会受到影响是随机的

有人对我们如何解决这个问题有什么想法吗?这看起来像是最新版本的ServiceFabric中的一个bug,但也许我们在这方面做错了什么

感谢您的帮助

下面是许多额外的信息,我希望这些信息将有助于理解我们在这个问题上面临的问题

非常感谢

步骤

我真的没有办法持续地重现这个问题。这就是我有时观察到的

  • 我从VisualStudio编译并重新部署了我的SF项目(调试->无调试启动)
  • VisualStudio说它成功地部署了这个项目
  • Service Fabric Explorer将我的所有服务显示为正常,包括数据绑定
  • 讨论中的SF项目有两个参与者,它们是单个EXE的一部分。Service Fabric Explorer显示了在不同节点上运行的每个参与者
  • Windows任务管理器显示两个正在运行的EXE副本,这很有意义,因为有两个节点正在运行EXE
  • 同样,我们的QA在直接使用PowerShell部署到Azure后也遇到了问题。(他不是从VisualStudio部署的。)

    重述

    • VisualStudio表示部署成功
    • Service Fabric Explorer显示一切正常
    • 任务管理器显示EXE的两个运行副本
    当我看到失败时

    我有一个SF服务使用ServiceProxy或ActorProxy类调用另一个SF服务。我们通过13个不同的应用程序和大约25个不同的服务和参与者的组合,在整个解决方案中实现了这一点。自2015年11月我们开始使用Service Fabric SDK v1.3以来,它已经成功运行

    现在,在升级到2.3.301之后,我们会定期出现一个随机参与者或服务进入一种状态,当从ServiceProxy或ActorProxy调用时,它无法响应对方法的调用。挂起5分钟后,我们收到System.Timeout异常,并显示以下消息:

    如果在服务繁忙或时间过长时丢弃消息,则可能发生这种情况 正在运行操作并且比配置的操作花费更多的时间 超时

    请注意,服务不忙,也不执行长时间运行的操作。作为参与者,该服务根本不执行任何正在进行的操作。它只是公开了其他服务可以使用的公共方法。它从第一次调用就失败了

    事实上,跟踪告诉我们,即使是actor中的第一行方法也从未被调用。这就好像服务结构通信基础设施无法传递消息

    何时开始

    在过去的12个月里,我们从未见过这个问题

    现在,自从上周升级服务结构以来,我们经常在各种情况下看到这个问题

    我们升级到Service Fabric SDK 2.3.301.9590和Service Fabric 5.3.301.9590

    起初,团队中的每个开发人员都独立地遇到了这个问题,每个人都认为这只是我们机器的暂时问题。服务结构确实存在一些问题,所以我们接受这一点,继续前进。但后来我们开始互相抱怨,意识到我们都看到了。就连我们的QA也在我们即将投入生产的环境中看到了它

    同样,这只是在上周我们升级到最新版本的Service Fabric时才开始的

    之前,我们运行的是ServiceFabricSDK2.0.135

    我们通过安装SDK v 2.3.301升级了代码库,打开了我们的每个解决方案,并允许Visual Studio进行升级

    环境

    我正在i7上运行新安装的Windows10Enterprise(不到两周前安装的),内存为16千兆。我新安装了Visual Studio 2015更新3和SF 2.3.301.9590。我把所有东西都装干净了。没有升级

    这也发生在我所有同事的机器上(不同的年龄、配置和“新鲜度”)。它偶尔发生在我们每个人身上

    最关键的是,这也发生在Azure上的服务结构VM上。这些机器是我们的QA在大约一个月前使用Azure上Service Fabric VM的标准模板创建的。它预装了5.3.301.9590。他没有手动将任何更新安装到Service Fabric。直到开发人员升级到新版本后,我们基于SF的应用程序才在Azure(或我们自己的开发机器)上遇到这个问题

    这不是我的机器,也不是孤立于开发环境的。我们所有人唯一一致的变化是SF版本的更新

    原因

    我们不知道是什么原因造成的

    It u
    "exception": {
        "ClassName": "System.TimeoutException",
        "Message": "This can happen if message is dropped when service is busy or its long running operation and taking more time than configured Operation Timeout.",
        "Data": null,
        "InnerException": null,
        "HelpURL": null,
        "StackTraceString": "   at Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient`1.<InvokeWithRetryAsync>d__7`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.ServiceFabric.Services.Remoting.Client.ServiceRemotingPartitionClient.<InvokeAsync>d__8.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.ServiceFabric.Services.Remoting.Builder.ProxyBase.<InvokeAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.ServiceFabric.Services.Remoting.Builder.ProxyBase.<ContinueWithResult>d__7`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at RenderingCachingEngine.RenderingCachingEngine.<Render>d__10.MoveNext() in C:\\Code\\Ink\\Dev\\Current\\Source\\Rendering Service Fabric\\RenderingCachingEngine\\RenderingCachingEngine.cs:line 381",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": "8\nMoveNext\nMicrosoft.ServiceFabric.Services, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\nMicrosoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient`1+<InvokeWithRetryAsync>d__7`1\nVoid MoveNext()",
        "HResult": -2146233083,
        "Source": "Microsoft.ServiceFabric.Services",
        "WatsonBuckets": null
      }
    
      "serviceFabricInfo": {
        "serviceFabricServiceName": "fabric:/Rendering/RenderingCachingEngine",
        "serviceFabricServiceTypeName": "RenderingCachingEngineType",
        "serviceFabricReplicaId": 131225099453058851,
        "serviceFabricPartitionId": "e400087d-8a08-4dab-bcdd-1f5ce82f374f",
        "serviceFabricApplicationName": "fabric:/Rendering",
        "serviceFabricApplicationTypeName": "RenderingType",
        "serviceFabricNodeName": "_Node_4"
      }
    
    Log Name:      Microsoft-ServiceFabric/Admin
    Source:        Microsoft-ServiceFabric
    Date:          11/2/2016 2:38:53 PM
    Event ID:      256
    Task Category: Common
    Level:         Error
    Keywords:      Default
    User:          NETWORK SERVICE
    Computer:      shayward10.ovx.local
    Description:
    WriteNode failed. HRESULT=-2147467259, Output=CustomOutput
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceFabric" Guid="{CBD93BC2-71E5-4566-B3A7-595D8EECA6E8}" />
        <EventID>256</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>1</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000001</Keywords>
        <TimeCreated SystemTime="2016-11-02T18:38:53.678587200Z" />
        <EventRecordID>7620</EventRecordID>
        <Correlation />
        <Execution ProcessID="4440" ThreadID="7360" />
        <Channel>Microsoft-ServiceFabric/Admin</Channel>
        <Computer>shayward10.ovx.local</Computer>
        <Security UserID="S-1-5-20" />
      </System>
      <EventData>
        <Data Name="id">
        </Data>
        <Data Name="type">XmlLiteWriter</Data>
        <Data Name="text">WriteNode failed. HRESULT=-2147467259, Output=CustomOutput</Data>
      </EventData>
    </Event>
    
    Log Name:      Microsoft-ServiceFabric/Admin
    Source:        Microsoft-ServiceFabric
    Date:          11/2/2016 2:38:54 PM
    Event ID:      23073
    Task Category: Hosting
    Level:         Warning
    Keywords:      Default
    User:          SYSTEM
    Computer:      shayward10.ovx.local
    Description:
    ServiceHostProcess: DataBinding.exe for ApplicationId 805915c7-456c-49d3-af95-62cc44650664 terminated unexpectedly with exit code 3221225786 on node id bf865279ba277deb864a976fbf4c200e
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceFabric" Guid="{CBD93BC2-71E5-4566-B3A7-595D8EECA6E8}" />
        <EventID>23073</EventID>
        <Version>0</Version>
        <Level>3</Level>
        <Task>90</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000001</Keywords>
        <TimeCreated SystemTime="2016-11-02T18:38:54.820567800Z" />
        <EventRecordID>7621</EventRecordID>
        <Correlation />
        <Execution ProcessID="6944" ThreadID="3812" />
        <Channel>Microsoft-ServiceFabric/Admin</Channel>
        <Computer>shayward10.ovx.local</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData>
        <Data Name="id">bf865279ba277deb864a976fbf4c200e</Data>
        <Data Name="AppId">805915c7-456c-49d3-af95-62cc44650664</Data>
        <Data Name="ReturnCode">3221225786</Data>
        <Data Name="ProcessName">DataBinding.exe</Data>
      </EventData>
    </Event>
    
    Log Name:      Microsoft-ServiceFabric/Admin
    Source:        Microsoft-ServiceFabric
    Date:          11/2/2016 2:38:56 PM
    Event ID:      256
    Task Category: Common
    Level:         Error
    Keywords:      Default
    User:          NETWORK SERVICE
    Computer:      shayward10.ovx.local
    Description:
    WriteNode failed. HRESULT=-2147467259, Output=CustomOutput
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceFabric" Guid="{CBD93BC2-71E5-4566-B3A7-595D8EECA6E8}" />
        <EventID>256</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>1</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000001</Keywords>
        <TimeCreated SystemTime="2016-11-02T18:38:56.261857600Z" />
        <EventRecordID>7627</EventRecordID>
        <Correlation />
        <Execution ProcessID="4440" ThreadID="8564" />
        <Channel>Microsoft-ServiceFabric/Admin</Channel>
        <Computer>shayward10.ovx.local</Computer>
        <Security UserID="S-1-5-20" />
      </System>
      <EventData>
        <Data Name="id">
        </Data>
        <Data Name="type">XmlLiteWriter</Data>
        <Data Name="text">WriteNode failed. HRESULT=-2147467259, Output=CustomOutput</Data>
      </EventData>
    </Event>
    
    Log Name:      Microsoft-ServiceFabric/Admin
    Source:        Microsoft-ServiceFabric
    Date:          11/2/2016 2:44:55 PM
    Event ID:      44289
    Task Category: FabricTransport
    Level:         Warning
    Keywords:      Default
    User:          NETWORK SERVICE
    Computer:      shayward10.ovx.local
    Description:
    Error While Sending Message : FABRIC_E_TIMEOUT
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceFabric" Guid="{CBD93BC2-71E5-4566-B3A7-595D8EECA6E8}" />
        <EventID>44289</EventID>
        <Version>0</Version>
        <Level>3</Level>
        <Task>173</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000001</Keywords>
        <TimeCreated SystemTime="2016-11-02T18:44:55.349048200Z" />
        <EventRecordID>7629</EventRecordID>
        <Correlation />
        <Execution ProcessID="18600" ThreadID="8076" />
        <Channel>Microsoft-ServiceFabric/Admin</Channel>
        <Computer>shayward10.ovx.local</Computer>
        <Security UserID="S-1-5-20" />
      </System>
     <EventData>
        <Data Name="id">
        </Data>
        <Data Name="type">ServiceCommunicationClient</Data>
        <Data Name="text">Error While Sending Message : FABRIC_E_TIMEOUT</Data>
      </EventData>
    </Event>
    
    <Endpoint Name="Actor1ActorServiceEndpoint" Port="0" />
    
    [assembly: FabricTransportServiceRemotingProvider(OperationTimeoutInSeconds = 3600)]
    [assembly: FabricTransportActorRemotingProvider(OperationTimeoutInSeconds = 3600)]