简体   繁体   English

将解决方案部署到Service Fabric群集时的问题

[英]Issues when deploying solution to Service Fabric cluster

All, 所有,

I seem to be unable to deploy an application that runs perfectly on my local cluster to a cluster in Azure. 我似乎无法将在本地群集上完美运行的应用程序部署到Azure中的群集。

Strange thing is that I was able to deploy this application in the past, but seem unable to now. 奇怪的是,我过去能够部署此应用程序,但现在似乎无法。 Upon deployment of the application it seems that my stateless services are first deployed without any problems, but my statefull services and actors seem to be unable to locate suitable nodes for replicas, as I seem to be receiving the following warning (through the service fabric explorer, when selecting the application): 部署应用程序后,似乎首先部署了我的无状态服务,没有任何问题,但是我的有状态服务和参与者似乎无法找到合适的副本节点,因为我似乎收到了以下警告(通过服务结构浏览器) ,选择应用程序时):

Unhealthy event: SourceId='System.PLB', Property='ServiceReplicaUnplacedHealth_Primary_8f41b6fb-3c6f-4916-9f85-27da0171ae6d', HealthState='Warning', ConsiderWarningAsError=false.
The Load Balancer was unable to find a placement for one or more of the Service's Replicas:
fabric:/Namespace/ActorService Primary Partition 8f41b6fb-3c6f-4916-9f85-27da0171ae6d could not be placed, possibly, due to the following constraints and properties:  
Placement Constraint: N/A
Depended Service: N/A

Constraint Elimination Sequence:
NodeBlockList eliminated 5 possible node(s) for placement -- 0/5 node(s) remain.

Upon further investigation, I also encountered the following error: 经过进一步调查,我还遇到以下错误:

Error event: SourceId='System.Hosting', Property='CodePackageActivation:Code:EntryPoint'.
ServiceManifestName='ActorPkg', NodeName='_nt1vm_4',AggregatedHealthState='Error'.

When checking all log files in blob storage, as well as the traces, I also found the following log statements: 在检查Blob存储中的所有日志文件以及跟踪时,我还发现了以下日志语句:

2016-5-12 12:54:15.176,Warning,1516,2528,Hosting.ProcessActivationManager,Application service 66933b89-78e9-4590-8971-d0cad139d956 with processId 3240 for parent process 310a2a579b75d9847ba5a43d6b365d7c terminated with exit code 2148734720
2016-5-12 12:54:15.176,Warning,1516,2528,Hosting._Nodes_ProcessUnexpectedTermination@310a2a579b75d9847ba5a43d6b365d7c,ServiceHostProcess: Process.exe for ApplicationId 66933b89-78e9-4590-8971-d0cad139d956 terminated unexpectedly with exit code 2148734720 on node id 310a2a579b75d9847ba5a43d6b365d7c
2016-5-12 12:54:15.176,Informational,1516,2528,Hosting.ProcessActivationManager,Sending ApplicationService host down notification for apphost 66933b89-78e9-4590-8971-d0cad139d956, node 310a2a579b75d9847ba5a43d6b365d7c
2016-5-12 12:54:15.176,Warning,2888,2556,Hosting.ApplicationHostManager@310a2a579b75d9847ba5a43d6b365d7c:131075269508464788,Processing termination of activated Application Host: HostId=66933b89-78e9-4590-8971-d0cad139d956, ExitCode=2148734720
2016-5-12 12:54:15.176,Warning,2888,2556,IPC.ServerFailedToRemoveClient,527e532390 client 66933b89-78e9-4590-8971-d0cad139d956 not found
2016-5-12 12:54:15.176,Informational,2888,2556,Hosting.ApplicationHostManager@310a2a579b75d9847ba5a43d6b365d7c:131075269508464788,RemoveActivationTableEntry: ErrorCode=S_OK, HostId=66933b89-78e9-4590-8971-d0cad139d956
2016-5-12 12:54:15.176,Informational,1516,2528,Transport.Enqueue,adb77036b0 enqueue ef74d99d-1a29-4c34-b6d1-1f59542a42d8:1926 False  319B @ qsize 0/0B
2016-5-12 12:54:15.176,Informational,2864,2556,RA.HostingProcessClosedEvent_Hosting@310a2a579b75d9847ba5a43d6b365d7c:131075269508464788,RA on node 310a2a579b75d9847ba5a43d6b365d7c:131075269508464788 performing AppHost down processing for apphost: 66933b89-78e9-4590-8971-d0cad139d956/
2016-5-12 12:54:15.176,Informational,2864,2556,RA.MultipleFTWorkBegin_MultipleFT@310a2a579b75d9847ba5a43d6b365d7c:131075269508464788,Multiple FT Work Begin [Activity: AppHostClosed 66933b89-78e9-4590-8971-d0cad139d956]. FTs 36
2016-5-12 12:54:15.176,Informational,2888,2556,Hosting.HostingHealthManager@310a2a579b75d9847ba5a43d6b365d7c:131075269508464788,ServicePackage ReportHealth: HealthReport(fabric:/Namespace+ActorPkg+310a2a579b75d9847ba5a43d6b365d7c instance=131075312250519674 System.Hosting CodePackageActivation:Code:EntryPoint Error ttl=Infinite sn=131075312551846737 There was an error during CodePackage activation.The service host terminated with exit code:2148734720 removeWhenExpired=false 2016-05-12 12:54:15.184 priority NotAssigned)

If anybody has any ideas or suggestions as to why my application can no longer be deployed on the cloud that would be greatly appreciated! 如果有人对为什么我的应用程序无法再部署到云上有任何想法或建议,将不胜感激!

Kind regards 亲切的问候

In response to The Muffin Man's comment, I've removed my answer from the question and placed it here (and accepted it as a solution): 为了回应《松饼人》的评论,我从问题中删除了我的答案,并将其放在此处(并接受了作为解决方案):

After figuring out how to turn out additional diagnostic information. 在弄清楚如何生成其他诊断信息之后。 (Via cloud explorer, navigate to the Virtual Machine Scale Sets and then select the scale set. In my case 'nt1vm' and choose Update Diagnostics... via Actions and turn on all logging) (通过云资源管理器,导航至“虚拟机规模集”,然后选择规模集。在我的案例中为“ nt1vm”,然后通过“操作”选择“更新诊断...”并打开所有日志记录)

I came upon this line (in the WADWindowsEventLogsTable): 我遇到了这一行(在WADWindowsEventLogsTable中):

.NET Runtime version : 4.0.30319.34209 - This application could not be started.This application requires one of the following versions of the .NET Framework: .NETFramework,Version=v4.6.1Do you want to install this .NET Framework version now?

So I'm downgrading my application to use .NET 4.5.2. 因此,我将应用程序降级为使用.NET 4.5.2。

UPDATE SOLVED: After downgrading to .NET 4.5.2 my application deployed perfectly. 解决的更新:降级到.NET 4.5.2后,我的应用程序完美部署。 Thanks for this post: Hosting console application in public service fabric cluster to let me try this. 感谢您的发布: 在公共服务结构群集中托管控制台应用程序,让我尝试一下。

I had this same 2148734720 error happen on my Service Fabric deployment too. 我的Service Fabric部署也发生了同样的2148734720错误。 My SF App was targeting .net 4.6.1, but the SF node did not have .net 4.6.X installed on it. 我的SF应用程序的目标是.net 4.6.1,但是SF节点上没有安装.net4.6.X。

After installing .net 4.6.2 on each of the deployment SF nodes (and rebooting), this error was fixed. 在每个部署SF节点上安装.net 4.6.2(并重新启动)之后,此错误已得到解决。

If you're using .Net core with a non en-US version of Windows you may be experiencing this issue with framework versions earlier than 2.0.3: https://github.com/Azure/service-fabric-issues/issues/643 如果您在非英语版本的Windows上使用.Net core,则可能会在2.0.3之前的框架版本中遇到此问题: https : //github.com/Azure/service-fabric-issues/issues/ 643

As the GitHub discussion says, the solution is to upgrade to a new version of .Net Core. 如GitHub讨论所述,解决方案是升级到.Net Core的新版本。 However, even after doing that you may still experience the problem if the new version of the framework isn't being picked up. 但是,即使这样做之后,如果未使用新版本的框架,您仍然可能会遇到问题。

You can workaround that by explicitly specifying the version in your .csproj: 您可以通过在.csproj中明确指定版本来解决此问题:

 <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
    <IsServiceFabricServiceProject>True</IsServiceFabricServiceProject>
 </PropertyGroup>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM