Microsoft Service Fabric Host Service (FabricHostSvc) Hangs on Start

假如想象 提交于 2019-11-29 09:23:28

问题


I've been working with Microsoft Service Fabric since November 2015 and have encountered many issues but now Service Fabric has become completely non-functional on my development machine. Uninstall/reinstall doesn't help.

I was using 1.5-preview and have since tried 2.0 to no avail.

The problem started when I attempted to run a Service Fabric Application from Visual Studio 2015 Update 1 (as I have done hundreds of times over the past few months).

My machine blue-screened (first time I've seen a Windows 10 blue screen). After rebooting, I was unable to get my Service Fabric Application to deploy via Visual Studio. The PowerShell script failed with the following message:

Starting service FabricHostSvc. This may take a few minutes... Start-Service : Failed to start service 'Microsoft Service Fabric Host Service (FabricHostSvc)'.

I went into the SCM and found "Microsoft Service Fabric Host Service" was in a state of Starting. It stayed that way for an hour. I tried stopping and starting the service several times and each time it hangs.

I uninstalled Service Fabric (Service Fabric, SDK and Tools for VS) and re-installed with the latest version 2.0 and it exhibits the same problem.

Reboot, same problem.

Removed c:\SfDevCluster folder, same problem.

Based on some other articles, I looked for any stray performance counters after uninstalling but there weren't any.

I tried looking through the registry but there are other Azure components with "Fabric" in the name. If I delete them, I will probably hose the rest of my Azure dev setup.

Now... when I attempted to start the service again, it did re-create the SfDevCluster folder and give me some logs. It seems to create two trace log files per minute and they have the EXACT same contents.

Every time it fails, the final line of the trace is:

Info ,11176,General.FabricSetup.Main,Operation failed with error 0xffffffff

An earlier trace (SF 1.5) seemed to use a constant rather than the hex value for the error. Seemed to indicate an invalid argument.

Whatever this failure is, it seems to be the cause of my woes. Unfortunately, the error is completely unhelpful.

I'm trying to avoid reinstalling Windows because that will kill an entire day of productivity.

Any help is greatly appreciated.


回答1:


From an elevated powershell session please run: Unregister-ScheduledTask FabricCounters.

This will fix the issue.




回答2:


I was seeing very similar behaviour and reinstalls of the fabric SDK and runtime, deleting scheduled tasks, deleting the SfDevCluster contents etc. all didn't work.

I was seeing repeated Docker errors in the event log and when I tried uninstalling Docker for Windows SF instantly woke up. I have no idea what the interaction is between the two but worth checking if you have both installed.




回答3:


It seems like some cluster related settings have gone into an inconsistent state on your machine. This will require looking at Service Fabric traces and figure out the actual cause. I am an engineer on the Service Fabric team. I can help you out if you can email me the Service Fabric traces (from logs folder) at harahma[at]microsoft[dot]com.

If you are familiar with logging support tickets on Azure, I would suggest you do that too so we can track this issue to resolution. In the meantime I will continue to work on this to see how we can unblock you.




回答4:


I know this is an old and question, but maybe my pain can help someone else out.

You'll get a similar error if the Windows Firewall service is not running when Service Fabric attempts to start.

Check and make sure that the Windows Firewall service is set for Automatic and is running.



来源:https://stackoverflow.com/questions/36364004/microsoft-service-fabric-host-service-fabrichostsvc-hangs-on-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!