6
votes

I want to start working with Azure Service Fabric technology.

I am working according to this document and install the latest SDK. After installation, I opened the PowerShell ("Run as administrator") command line windows and write those lines:

# Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
# cd "$env:ProgramW6432\Microsoft SDKs\Service Fabric\ClusterSetup"
# .\DevClusterSetup.ps1

As an answer, got this error:

Cleaning existing cluster ...

  NOTE: If this powershell command window exits, please re-run the script in a new powershell command window.


Stopping service FabricHostSvc. This may take a few minutes...
Removing cluster configuration
Remove node configuration succeeded
Cleaning existing certificates
Stopping all logman sessions
Cleaning log and data folder, the powershell window may close automatically.
ClusterPath not provided, will use C:\SfDevCluster
FabricDataRoot not provided, will use C:\SfDevCluster\Data
FabricLogRoot not provided, will use C:\SfDevCluster\Log


    Directory: C:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         4/11/2015  12:47 PM            SfDevCluster


    Directory: C:\SfDevCluster


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         4/11/2015  12:47 PM            Manifests
True
Create node configuration succeeded
Starting service FabricHostSvc. This may take a few minutes...
Start-Service : Failed to start service 'Microsoft Service Fabric Host Service (FabricHostSvc)'.
At C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1:167 char:1
+ Start-Service FabricHostSvc -WarningAction SilentlyContinue
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
   ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

WARNING: Could not start FabricHostSvc

The bottom line is "Failed to start service". This output is printed to the screen after 3 minutes of waiting.

Things I've already been tried:

  1. Restart the computer few times (I was reading somewhere that this solve the problem).
  2. Turn OFF my Anti-virus\firewall software.

Attached screenshot of the PowerShell Command line. enter image description here I'm using:

  • Visual studio 2015 Enterprise edition
  • Windows 8.1
  • Azure Service Fabric SDK v1.0.328
3
Might be worth trying to start that service from the Services window (Run > Services) to see if you get any error messages. It's called "Microsoft Service Fabric Host Service".charisk
The status of this service is "Starting...". Looks like stuck.No1Lives4Ever
Have you tried stopping it and restarting it? There may be some errors in the Event Log.charisk
daustinash has the right idea. You can read more about it here: stackoverflow.com/questions/30939665/…Matt Trower - MSFT

3 Answers

3
votes

I also fought with this problem just this morning. I did NOT have to reinstall Windows.

I too found events in the event log talking about corrupt performance counters. I'm not sure if it's related or not but I ran this command from a cmd windows as administrator to rebuild the performance counters and the error clear up:

lodctr /r

I then went to Programs and Features and uninstalled anything that mentioned Service Fabric.

I then reinstalled the Service Fabric SDK and followed the instrucions on the Azure Service Fabric environment setup page here and my cluster started working fine.

1
votes

I was facing the same issue and tried many times one evening and next morning I got the answer. Well the answer is "Ensure that Firewall is on".

0
votes

UPDATE2: This is a very old issue and I have not seen this reoccur since Nov 2015. (added just so this post doesn't get down-voted any more :-/ ).

UPDATE: I have not had this issue since the November update.

ORIGINAL:I had this issue the other day and tried everything. I had uninstalled, rebooted, reinstalled everything from Service Fabric down to Azure SDK's and Visual Studio.

The fix - pretty bad. Reinstall windows.

At one point, I found a trace that indicated a registry corruption. Something about unable to find a performance counter.

Right now I have a new issue (which I'll post separately) but just repeating here to let people know there is some buggy infrastructure under this service right now.... My stateful/stateless app deploys. The stateless app deploys and runs. The stateful service deploys but will not replicate. If I run exactly the same code on another machine (and I mean copy/paste to other machine then run it), it all works.