SharePoint search provision fail .

Apr 9, 2013 at 4:15 PM
I try to setup using 3 tier (2 wp + 2 app + sql) using 3.86. sharepoint 2013 with sql server 2008r2
all the search stuff are install in 2 app (crawl, query, admin, index...). i don't do off line install i start on wfe1, then wfe2, then app1 (it failed here to create search tapology)


Exception : System.Management.Automation.MethodInvocationException:
                     Exception calling "Activate" with "0" argument(s): 
                    "Timed out waiting for search service 
                    'SPSearchHostController' provisioning timer job to 
                    complete" ---> System.TimeoutException: Timed out 
                    waiting for search service 'SPSearchHostController' 
                    provisioning timer job to complete
                       at Microsoft.Office.Server.Search.Administration.Sea
                    rchAdminUtils.WaitForProvisioningComplete[T](T 
                    searchServiceInstance)
                       at Microsoft.Office.Server.Search.Administration.Top
                    ology.SearchTopology.BeginActivateSilently()
                       at Microsoft.Office.Server.Search.Administration.Top
                    ology.SearchTopology.ActivateSilently()
                       at Microsoft.Office.Server.Search.Administration.Top
                    ology.SearchTopology.Activate()
                       at CallSite.Target(Closure , CallSite , Object )
                       --- End of inner exception stack trace ---
                       at System.Management.Automation.ExceptionHandlingOps
                    .CheckActionPreference(FunctionContext funcContext, 
                    Exception exception)
                       at System.Management.Automation.Interpreter.ActionCa
                    llInstruction`2.Run(InterpretedFrame frame)
                       at System.Management.Automation.Interpreter.EnterTry
                    CatchFinallyInstruction.Run(InterpretedFrame frame)
                       at System.Management.Automation.Interpreter.EnterTry
                    CatchFinallyInstruction.Run(InterpretedFrame frame)
                       at System.Management.Automation.Interpreter.Interpre
                    ter.Run(InterpretedFrame frame)
                       at System.Management.Automation.Interpreter.LightLam
                    bda.RunVoid1[T0](T0 arg0)
                       at System.Management.Automation.ScriptBlock.InvokeWi
                    thPipeImpl(Boolean createLocalScope, 
                    ErrorHandlingBehavior errorHandlingBehavior, Object 
                    dollarUnder, Object input, Object scriptThis, Pipe 
                    outputPipe, InvocationInfo invocationInfo, Object[] 
                    args)
                       at System.Management.Automation.ScriptBlock.<>c__Dis
                    playClass4.<InvokeWithPipe>b__2()
                       at System.Management.Automation.Runspaces.RunspaceBa
                    se.RunActionIfNoRunningPipelinesWithThreadCheck(Action 
                    action)
                       at System.Management.Automation.ScriptBlock.InvokeWi
                    thPipe(Boolean useLocalScope, ErrorHandlingBehavior 
                    errorHandlingBehavior, Object dollarUnder, Object 
                    input, Object scriptThis, Pipe outputPipe, 
                    InvocationInfo invocationInfo, Object[] args)
                       at System.Management.Automation.ScriptBlock.InvokeUs
                    ingCmdlet(Cmdlet contextCmdlet, Boolean useLocalScope, 
                    ErrorHandlingBehavior errorHandlingBehavior, Object 
                    dollarUnder, Object input, Object scriptThis, Object[] 
                    args)
                       at Microsoft.PowerShell.Commands.ForEachObjectComman
                    d.ProcessRecord()
                       at System.Management.Automation.CommandProcessor.Pro
                    cessRecord()
TargetObject :
CategoryInfo : NotSpecified: (:) [ForEach-Object],
                    MethodInvocationException
FullyQualifiedErrorId : TimeoutException,Microsoft.PowerShell.Commands.ForEachO
                    bjectCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>,
                    Z:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: 
                    line 3914
                    at CreateEnterpriseSearchServiceApp, 
                    Z:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: 
                    line 3661
                    at Setup-Services, 
                    Z:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 207
                    at <ScriptBlock>, 
                    Z:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 358
                    at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Apr 10, 2013 at 9:48 PM
Edited Apr 10, 2013 at 9:49 PM
restarting server and rerun solve my problem.
Mar 20, 2015 at 1:04 PM
Edited Mar 20, 2015 at 1:06 PM
A colleague and I spent an afternoon troubleshooting the cause of this in a least privileged SharePoint 2013, Server 2012 R2 multi-server farm. This article was the key to solving it.

What is happening is that there are 3 Windows services:
  • NetTcpActivator
  • NetPipeActivator
  • NetTcpPortSharing
These 3 services cache group permissions when the server boots up. Then when you install SharePoint, it creates a group called WSS_WPG, into which the account running the search service gets added. This group "should" have access to these 3 services, but it doesn't, because the permissions for it were cached before this group was even created (during the SharePoint install). This is why restarting the server fixes the problem!

So we were able to fix this issue by adding the following code early in the search service creation function:

Net stop NetTcpActivator
Net stop NetPipeActivator
Net stop NetTcpPortSharing
Net start NetTcpActivator
Net start NetPipeActivator
Net start NetTcpPortSharing

This completely negates the need for the workaround currently in the code, that performs an unprovision / provision($true), if the search host service is stuck in a starting/provisioning state. This solution also solves the issue mentioned here: https://autospinstaller.codeplex.com/discussions/402412