【发布时间】:2019-07-02 11:52:13
【问题描述】:
我在将微服务应用程序部署到 Azure 中的远程 Service Fabric 集群时遇到问题。
应用程序由 5 个服务组成,其中 4 个已成功启动,它们的状态显示为 Ready。但是一个失败并出现以下错误(所有节点上的状态在InBuild 和Error 之间变化):
'System.RA' reported Warning for property 'ReplicaOpenStatus'.
Replica had multiple failures during open on _nt1bm_5. API call:
IStatelessServiceInstance.Open(); Error =
System.Resources.MissingManifestResourceException (-2146233038)
Could not find any resources appropriate for the specified culture or the
neutral culture. Make sure
"Microsoft.ServiceFabric.Services.Communication.AspNetCore.SR.resources" was
correctly embedded or linked into assembly
"Microsoft.ServiceFabric.AspNetCore" at compile time, or that all the
satellite assemblies required are loadable and fully signed.
at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at Microsoft.ServiceFabric.Services.Communication.AspNetCore.AspNetCoreCommunicationListener.GetEndpointResourceDescription(String endpointName)
at Microsoft.ServiceFabric.Services.Communication.AspNetCore.KestrelCommunicationListener.GetListenerUrl()
at Microsoft.ServiceFabric.Services.Communication.AspNetCore.AspNetCoreCommunicationListener.OpenAsync(CancellationToken cancellationToken)
at Microsoft.ServiceFabric.Services.Runtime.StatelessServiceInstanceAdapter.OpenCommunicationListenersAsync(CancellationToken cancellationToken)
at Microsoft.ServiceFabric.Services.Runtime.StatelessServiceInstanceAdapter.System.Fabric.IStatelessServiceInstance.OpenAsync(IStatelessServicePartition partition, CancellationToken cancellationToken)
For more information see: https://aka.ms/sfhealth
一些注意事项:
- 所有服务使用几乎完全相同的主机初始化(端口不同)
- 应用程序配置为仅使用 HTTPS
- 使用 .NET Core 2.2 编写的应用程序
- 当前的 Service Fabric 版本是 6.4.637.9590
- 主机的操作系统是 Windows Server(可能是 2012 年)
- 在本地集群上,它工作得很好
- 使用 .NET Core 自托管,一切正常
可能是什么原因造成的?
如何调试此类错误?
Service Fabric 的源代码是否可以在某处查看失败的代码?
如果您需要任何其他信息,请询问:)
【问题讨论】:
-
SF 源代码可在 github 上找到,但它是 C++ 和跨平台的,而且很难慢下来。我怀疑这会带你到任何地方。试试这个可能吗? github.com/Microsoft/aspnet-api-versioning/issues/331
-
尝试将软件包更新到
3.3.638版本,有一些 issues 包含最新版本的软件包。
标签: .net-core azure-service-fabric service-fabric-stateless