Another example of “when SharePoint goes wrong.” On a dev machine, the search service mysteriously stopped working. I can’t pinpoint what caused it, but SP1 and a CU were recently applied and these seem like good candidates for breaking things. When trying to admin the search service, you would see the following error:
The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component ’{guid}′ in search application ‘Search Service Application’ is in a good state and try again.
…and trying to modify the topology of the search, resulted in a spurious error:
An unhandled exception occurred in the user interface.Exception Information: Exception has been thrown by the target of an invocation.
Something was clearly unhappy. Rather than waste too much time, the simplest solution seemed to be to delete the search application and recreate it, which I duly did, via Central Admin, verified that DBs and application pools disappeared and recreated the search application, using new names and credentials. Same error. I wasted spent some looking at permissions and the usual array of logs, events and other candidates, ran PSConfig and other upgrades, all to no avail.
I figured I could create the search application via Powershell. Why should this make a difference? No idea, but worth a shot. Then thankfully, I found that someone had already done it for me. And yes, this resolved the issues. I can’t explain why seeing as this script shouldn’t do anything that the GUI doesn’t do.
Script:






for