search service stuck in stopping state sharepoint

Search service stuck in stopping state when you tried to restart the service sharepoint server search. Sharepoint search returns correlation id error for whcih you decided to restart the search service from manage services on server. This post describes the step by step procedure to resolve issue by reprovisioning sharepoint server search service.

Advertisements

Restart/Reprovision search service

Run the script mentioned below to restart/reprovision search service.

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
$SearchServiceInstance = Get-SPEnterpriseSearchServiceInstance -Identity "WIN-Q2REPGHF9DU"
Start-SPEnterpriseSearchServiceInstance -identity $SearchServiceInstance # Wait for search service instance to come online
do {$online = Get-SPEnterpriseSearchServiceInstance -identity $SearchServiceInstance; Write-Host "Waiting for service: " $online.Status}
until ($online.Status -eq "Online")
Advertisements

After applying the script, you will notice the progress details as per below screenshot.

search service status in stopping
Advertisements

Sharepoint server search service will change to Started state which was previously stuck in stopping. So we we just need to repovision sharepoint server serach service using script.

restart search service
Advertisements


Categories: Service Application, SharePoint 2019, sharepoint search, sharepoint server, sharepoint services, windows service

Tags: , , , , , , , , ,

Leave a Reply