1

To put it short, the file server's index would fail randomly.

The file server has Windows Search service enabled and indexed. There are many clients connected to this server, possibly up to 100. The client Windows (7/10) machines would fail to search the server. Green bar keeps going and going with no result shown.

On the server, it can be resolved by simply restarting the Windows Search (Wsearch) service. It would take a long time (like a minute) to stop/restart. When "stopped", it would throw out an error saying the service cannot be stopped. Below is the error thrown stopping the service from powershell.

Stop-Service : Service 'Windows Search (Wsearch)' cannot be stopped due to the following error: Cannot stop Wsearch
service on computer '------'.
At C:\Users\------\Documents\PSscript\Wsearch-stop.ps1:4 char:54
+ Get-Service -Name $svc_name -ComputerName $pc_name | Stop-Service
+                                                      ~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (System.ServiceProcess.ServiceController:ServiceController) [Stop-Service],
   ServiceCommandException
    + FullyQualifiedErrorId : CouldNotStopService,Microsoft.PowerShell.Commands.StopServiceCommand

Sometimes it won't fail but it could also fail many times per day. We haven't been able to find out the culprit and have to restart it upon request. File operations are unhindered.

edit: I wonder if anyone had such problem. I found nothing on the net. My current solution is try to make a script to query the network index from a client computer and when found error, restart the service.

closed as unclear what you're asking by joeqwerty, Andrew Schulman, Ward, MadHatter, Stefan Lasiewski Mar 15 '18 at 19:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

Look at event log on the client machine and find the time when the indexing search failed. You can create a special scheduled task which will be triggered by a needed event and will run PS script. My colleague wrote a sample for you:

Enter-PSSession -ComputerName "example-server.domain.local"

Set-Service "WSearch" -StartupType manual

Get-Service -Name "WSearch" | Format-List -Property Name, DependentServices |

Out-Null

Stop-Service -Name "WSearch" -Force -Confirm

Start-Service -Name "WSearch" -Confirm

SearchIndexer.exe

  • 1
    Thanks for mentioning the event log. I cannot find any log on the clients when search failed. However on the server it has 7011 service timeout. I can use that as trigger point. It's a bandage but at least a step forward. Marking this as solved but still welcome any solution. – Alf Mar 12 '18 at 14:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.