3

the search service of the the farm is not responding properly. In particular the crawler component is having troubles. When I search for something I get this: enter image description here

I am constantly seeing the following error messages in the ULS and the event viewer.

SQL database login for 'DBConfig' on instance 'DBINSTANCE' failed. Additional error information from SQL Server is included below. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

And:

WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/35320229 Exception: System.ServiceModel.ServiceActivationException: The service '/f8ae6f7ce3b14e8f878011953c2eca0d/SearchService.svc' cannot be activated due to an exception during compilation. The exception message is: The farm is unavailable.. ---> System.InvalidOperationException: The farm is unavailable. at Microsoft.SharePoint.Administration.Claims.SPSecurityTokenServiceManager.get_Local() at Microsoft.SharePoint.SPServiceHostOperations.Configure(ServiceHostBase serviceHost, SPServiceAuthenticationMode authenticationMode) at Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) at

System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) --- End of inner exception stack trace --- at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity) Process Name: w3wp Process ID: 3844

The search service application is running with errors:

enter image description here

The timer and the search service are running under a single service account which is a dbowner. The same account is used in the application pools under IIS:

enter image description here I don't understand why this account 'NT AUTHORITY\ANONYMOUS LOGON' is used and not the service account. In addition when I navigate to the central administration -> Security -> Configure Service accounts, I am getting this:

enter image description here

But the Managed accounts are accessible: enter image description here

Database version: enter image description here

1

from the last 2 screen shot ( identity not translated), It is giving me the idea that you have the orphan account in your Manged account page or in Policy of web app or Search service administration etc.

  • Please make sure all the accounts are valid, means they exist in the AD. No one delete the account (may be by mistake). you have to remove the account from SharePoint. i think check this account "CRP\cph_srv_sharepoint_t".

Did you change the service account?

try this powershell to remove the orphan account:

$acc = Get-SPManagedAccount -identity "CRP\cph_srv_sharepoint_t"
Remove-SPManagedAccount $acc
  • No, I haven't. I tried to remove "CRP\cph_srv_sharepoint_t" from the central admin but it failed to do that, but I haven't tried powershell so far. I don't have access to the AD, but I have asked the infrastructure team to help on this. – dimitrisd Dec 4 '18 at 13:40
  • 1
    check powershell, i added into my answer....what that account is doing? did you change the service account? – Waqas Sarwar MVP Dec 4 '18 at 13:43
  • This is a sandbox farm. I ran the commands and the account has been deleted. I don't know what this account is doing but it's not being used by anything. I recently took the responsibility of the farm and I have very limited knowledge on this. Any help will be really appreciated – dimitrisd Dec 4 '18 at 13:47
  • 1
    great, now orphan account is removed. What is the search status? may be try to stop & start services – Waqas Sarwar MVP Dec 4 '18 at 13:49
  • 1
    did you / or some one apply the CU but forget to run the config wizard? check the status of the database from central admin – Waqas Sarwar MVP Dec 4 '18 at 14:09
0

If you can't fix it by starting and stopping services, editing permissions on Web Applications or databases or any other way, I suggest you create a clone of your current search topology, replace the broken Crawl Component with a new one and set the clone as an active topology with the following easy-to-follow PS-scripts.

Clone Search Topology

At fisrt I tried clone the search topology, replace the failing Index Component, and activate the clone topology - like this following the technet guide Manage the index component in SharePoint Server 2013:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "SharePointServerName"

# If the Search Service Instance isn't started, run the following command
#Start-SPEnterpriseSearchServiceInstance $hostA

# Wait for ONLINE status, check by using this
#Get-SPEnterpriseSearchServiceInstance $hostA 

# When ONLINE, make a clone
$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active

# Create a new Index Partition (0) - outputs IndexComponent2
New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -SearchServiceInstance $hostA -IndexPartition 0

# Verify that the search service application is running. False=Running, True=Paused
$ssa.IsPaused() –ne 0

# Set the clone as the new topology (takes a while). If Index component is Degraded, this will run with no end
$ssa.PauseForIndexRepartitioning() 
Set-SPEnterpriseSearchTopology -Identity $clone

However, having an degraded index component made this action impossible. Reference: SharePoint 2013 Unable to change topology when Generation controller is not active

Create a new Topology

Next step, make a new, fresh topology (using this technet guide: Change the default search topology in SharePoint Server 2013).

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "SharePointServerName"

# If the Search Service Instance isn't started, run the following command
#Start-SPEnterpriseSearchServiceInstance $hostA

# Wait for ONLINE status, check by using this
#Get-SPEnterpriseSearchServiceInstance $hostA 

# When ONLINE, make a new topology
$ssa = Get-SPEnterpriseSearchServiceApplication
$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

# Create new components (one server only)
New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA

# Set the Admin Component without index
set-SPEnterpriseSearchAdministrationComponent -SearchApplication $ssa -SearchServiceInstance  $hostA

# Remove temp Index files, and recreate the folder
$IndexLocation = "C:\Index" # Change to another disk than system disk
Remove-Item -Recurse -Force -LiteralPath $IndexLocation -ErrorAction SilentlyContinue
mkdir -Path $IndexLocation -Force 

# Create new index component with a frech index folder
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostA -RootDirectory $IndexLocation -IndexPartition 0

# Activate the topology (either one of the following works)
$newTopology.Activate()
#Set-SPEnterpriseSearchTopology -Identity $newTopology

Your Answer

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

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