1

My SharePoint Search is suddenly not working. I have tried restarting services/clearing cache and restarting server but I still have this: enter image description here

I also have the search stck on paused and All Errors: enter image description here

And the Powershell command never seems to end:

PS C:\Users\SPFarmSvc> Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
PS C:\Users\SPFarmSvc> $ssa = Get-SPEnterpriseSearchServiceApplication "SharePoint_Search_Service"
PS C:\Users\SPFarmSvc> Resume-SPEnterpriseSearchServiceApplication $ssa

Sometimes I even get red crosses as below: enter image description here

I even tried the below but the status is stuck on paused and showing All Errors:

Event Logs shows this error for VSS:

Volume Shadow Copy Service error: Unexpected error calling routine RegOpenKeyExW(-2147483646,SYSTEM\CurrentControlSet\Services\VSS\Diag,...). hr = 0x80070005, Access is denied. .

Operation: Initializing Writer

Context: Writer Class Id: {0ff1ce15-0201-0000-0000-000000000000}
Writer Name: OSearch15 VSS Writer Writer Instance Name: OSearch15 Replication Service Writer Instance ID: {983a2893-68e6-42ed-9e42-932f132b9257

Yet when I checked the registry keys VSS seemed to have the correct permissions: enter image description here

#########################################################################
# Enterprise Search Deployment Script
# -----------------------------------
# Deploys Enterprise Search to a traditional, three-server SharePoint
# 2013 farm (1 App, 2 WFE), and configures it with the following
# application topology:
# 
# Server Role       Search Components
# -----------       --------------------
# Application       Admin
#           Crawler
#           Content Processing
#           Analytics Processing
# WFEs          Query Processing
#           Index Partition
#
# Acknowledgements
# ----------------
# This script is based upon that originally published by Ryan Bushnell
# in his 7 August 2013 blog post, "SharePoint 2013 Search Configuration 
# PowerShell Script".  I've made minor tweeks to it in order to extend
# it to a three-server topology. To use the script below, replace
# bracketed values with those appropriate to your own farm.
# Many thanks to Ryan for making search deployment much more 
# automated and consistent.
#
# Notes
# -----
# 1) I use the traditional search service account both for search
# administration and for query processing.
# 2) The D drive is configured as the data drive on all farm servers.
#
# Stephan Albert Bren
# May 17, 2014.
##########################################################################


#Setup Variables
#---------------
#Assume 3 Accounts (Content Access, Admin, Query)
#### Note - You should setup the Index Location prior to running these commands and ensure it is an empty folder
#### Note - If you setup diag logging prior to running script, ensure you give dbo permissions to the account you run this under
write-host 0. Setting up some initial variables.




$AppSvr = "server 1"
$WebSvr1 = "server 1"
$WebSvr2 = "server 2"

$CAAcct = "servivce acc"
$password = "***"
$CAAcctPW = ConvertTo-SecureString -String $password -AsPlainText -Force

$AdminAcct = service acc"
$QueryAcct = "service acc"
$SSAName = "Search_Service"
$DBPrefix = "SP_Search"

$SSIAppSvr = get-SPServiceInstance -server $AppSvr |?{$_.TypeName -eq "SharePoint Server Search"}
$SSIWebSvr1 = get-SPServiceInstance -server $WebSvr1 |?{$_.TypeName -eq "SharePoint Server Search"}
$SSIWebSvr2 = get-SPServiceInstance -server $WebSvr2 |?{$_.TypeName -eq "SharePoint Server Search"}

$IndexLocation = "C:\Scripts\search_data"
$err = $null
 
 
#Start Services for SSI
#----------------------
write-host 1. Start Services search services for Each Server

Start-SPEnterpriseSearchServiceInstance -Identity $SSIAppSvr
Start-SPEnterpriseSearchServiceInstance -Identity $SSIWebSvr1
Start-SPEnterpriseSearchServiceInstance -Identity $SSIWebSvr2
 

#Create Application Pools
#------------------------
write-host 2. Create a Application Pools

#$AdminAppPool = new-SPServiceApplicationPool -name   $SSAName"-AdminAppPool" -account $AdminAcct 
#$QueryAppPool = new-SPServiceApplicationPool -name   $SSAName"-QueryAppPool" -account $QueryAcct

$AdminAppPool = new-SPServiceApplicationPool -name   $SSAName" AppPool" -account $AdminAcct 
$QueryAppPool = $AdminAppPool
 

#Create Search Service Application
#---------------------------------
write-host 3. Create the SearchApplication and set it to a variable

$SearchApp = New-SPEnterpriseSearchServiceApplication -Name $SSAName -applicationpool $AdminAppPool -databasename $DBPrefix"_AdminDB"
 
 
#Create Search Service Application Proxy
#---------------------------------------
write-host 4. Create search service application proxy

$SSAProxy = new-spenterprisesearchserviceapplicationproxy -name $SSAName" Application_Proxy" -SearchApplication $SearchApp
 
 
#Clone Search Topology (this is empty by default)
#------------------------------------------------
write-host 5. Clone Search Topology

$SearchTopology = $SearchApp.ActiveTopology.Clone()
 
 
#Provision Search Administration Component
#-----------------------------------------
write-host 6. Provision Search Admin Component.

New-SPEnterpriseSearchAdminComponent -SearchServiceInstance $SSIAppSvr -SearchTopology $SearchTopology
 
 
#Provision New Search Content Processing Component
#-------------------------------------------------
write-host 7. Create New Search Content Processing Component

New-SPEnterpriseSearchContentProcessingComponent -SearchServiceInstance $SSIAppSvr -SearchTopology $SearchTopology
New-SPEnterpriseSearchContentProcessingComponent -SearchServiceInstance $SSIWebSvr2 -SearchTopology $SearchTopology
 
 
#Provision New Search Analytics Processing Component
#---------------------------------------------------
write-host 8. Create New Search Analytics Processing Component

New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchServiceInstance $SSIAppSvr -SearchTopology $SearchTopology
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchServiceInstance $SSIWebSvr2 -SearchTopology $SearchTopology
 
 
#Provision New Search Crawl Component
#------------------------------------
write-host 9. Create New Search Crawl Component

New-SPEnterpriseSearchCrawlComponent -SearchServiceInstance $SSIAppSvr -SearchTopology $SearchTopology
New-SPEnterpriseSearchCrawlComponent -SearchServiceInstance $SSIWebSvr2 -SearchTopology $SearchTopology
 
#Provision New Search Index Component
#------------------------------------
write-host 10. Create New Search Index Component

New-SPEnterpriseSearchIndexComponent -SearchServiceInstance $SSIWebSvr1 -SearchTopology $SearchTopology -RootDirectory $IndexLocation
New-SPEnterpriseSearchIndexComponent -SearchServiceInstance $SSIWebSvr2 -SearchTopology $SearchTopology -RootDirectory $IndexLocation
 

#Provison New Query Processing Component
#---------------------------------------
write-host 11. Create New Query Processing Component
New-SPEnterpriseSearchQueryProcessingComponent -SearchServiceInstance $SSIWebSvr1 -SearchTopology $SearchTopology
New-SPEnterpriseSearchQueryProcessingComponent -SearchServiceInstance $SSIWebSvr2 -SearchTopology $SearchTopology
  
#Activate Topology Changes
#-------------------------
write-host 12. Activate Topology
$SearchTopology.Activate()
 
 
#Setup default Content Access Account
#------------------------------------
write-host 13. Set the default content access account

Set-SPEnterpriseSearchServiceApplication –Identity $SearchApp -ApplicationPool $QueryAppPool -DefaultContentAccessAccountName $CAAcct -DefaultContentAccessAccountPassword $CAAcctPW
 
#Finish
#------
Write-host "Your search application $SSAName is now ready"
  • You need to review the ULS logs to see what is the error when you try to start. There should be something logged. I would review as well the event viewers on the servers that hold the partition. – Marek Sarad Apr 11 at 7:58
  • I get this error (check edit above) – Saz Mifsud Apr 11 at 8:25
  • It may be red herring, are you using shadow copy service on your storage? What you get in ULS? – Marek Sarad Apr 11 at 10:01
  • I recreated the search. the status is now running however the searchable items is still giving all errors, and index partition still has an exclamation mark – Saz Mifsud Apr 11 at 11:20
  • If you recreated the search, and there is still problem with index partition there might be a problem with disk itself. try to create a new search web app (Leave the original one) and try to create index partition on different drive, even on C for test to see does this works. – Marek Sarad Apr 11 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.