Monthly Archives: April 2014

SharePoint 2013: Search Host Controller Service stuck in ‘starting’ state.

An odd issue came up recently where the Search Host Controller Service on a single web front end was stuck in the ‘starting’ state (as shown in the CA -> System Settings -> Services on Server). Couldn’t locate anything in the event log that showed why it didn’t start. And the final oddity: the service in Windows Services was started and running normally on all machines in the farm.

There are a bunch of posts out there (this one and others) that suggest un-provisioning and modifying registry settings and re-provisioning … oh myyyyy!

Before going down that path:

Start simple

When stuck in the starting state, there’s no ability via Central Admin to stop, start or restart. You might think rebooting your WFE might do the trick … no, think again. So the first step: enumerate the host services on your farm in powershell (note you will need to run as admin):

Get-SPServiceInstance | ? {$_.TypeName -eq "Search Host Controller Service"}

This will produce something similar to the following, though you will see differences based on the number of servers in your farm, and hopefully different GUIDs. If our GUIDs match … run for cover because the world is ending.

Server : SPServer Name=WFE1
HostControllerURL : net.tcp://WFE1/ceres/hostcontroller/nettcp
RepositoryVersion : 0
PrimaryHostController : True
SearchServiceInstanceId : 43d4837c-b0c6-42e1-93ff-c8b872854be7
Server : SPServer Name=WFE2
HostControllerURL : net.tcp://WFE2/ceres/hostcontroller/nettcp
RepositoryVersion : 0
PrimaryHostController : False
SearchServiceInstanceId : 6d02e4ab-bfb9-442f-8a29-705274ec8262
Server : SPServer Name=WFE3
HostControllerURL : net.tcp://WFE3/ceres/hostcontroller/nettcp
RepositoryVersion : 0
PrimaryHostController : False
SearchServiceInstanceId : 98d9cc05-92d6-4e2a-b872-3bd7d22f33a4

Super. I see services and one of them is dead. What’s next?

In this instance, it happens to be an issue on the 3rd server. I stopped and started it by running these two commands:

Stop-SPServiceInstance -Identity 98d9cc05-92d6-4e2a-b872-3bd7d22f33a4

And finally:

Start-SPServiceInstance -Identity 98d9cc05-92d6-4e2a-b872-3bd7d22f33a4

After refreshing CA -> Services on Server, the service was listed in the ‘started’ state.

 

 

Why did this happen?!?

No. Idea. If I had to make an semi-educated guess, it wasn’t really an issue other than it was displaying as “starting” in CA. The service was clearly running in windows services. Perhaps during startup the messaging got stuck. That being said, it looked very angry, and might have lead to false-positives when chasing down other issues on the farm.

 

Happy SharePointy-ing.
Jim

Advertisements

.NET 4: GAC’ing Assemblies Made Simple

Installing assemblies into the GAC is no longer straight forward. In the good ol’ days it used to be as simple as dragging a file into the Assembly folder. Or using the gacutil.exe. Neither is available any longer.

According to various posts out in the wild wild web, the updated .NET 4 version of gacutil.exe is for dev purposes only and should not be used in a production environment. It says so here, and I believe everything posted on the internet. The recommended approach of using a Setup and Deployment InstallSheild (Limited Edition) installation project also has it’s issues; the out of the box version installed with VS 2012 is not usable without downloading a new version, downloading a new version requires you to register, registration is a hassle, and the dude doesn’t abide hassles.

So … is there another option?

You betcha.

Are you going to tell me what it is?

If you ask nicely.

Okay, what’s the other option?

Check out PowerShellGac on CodePlex. It contains several useful ps scripts for getting assemblies into and out of the GAC. This was the best option I found.

The documentation on CodePlex is good enough to get you going, however when running the Install-Module command, I had to do: Install-Module .\Gac instead of Install-Module Gac. No big whoop.

Is there a catch?

Not really. If I had one wish for Christmas this year, just one wish, this set of scripts would allow for deployments of assemblies to various staging and production servers remotely. In order to use these powershells they need to be deployed to each server and run individually.

Are there other options?

Great question. Do you know of a better method or better scripts? Is there an easier way to install remotely? Comment up, people.

*EDIT*: I’ve finally had a moment to check into powershell remoting. It’s fairly straight forward. The one catch is remoting must be enabled on your various machines. Take a look at this TechNet post for more informaiton.

Cheers,
Jim