Skip Ribbon Commands
Skip to main content

SharePoint Lover

:

SharePoint Lover > Posts > Fixing the SharePoint 2010 Search Service Application
November 11
Fixing the SharePoint 2010 Search Service Application

Search plays an important in SharePoint 2010 services and the search service application that handles all search requests as well. From time to time, and for various reasons, the search functionality may stop working and this can be attributed to a failure of crawl jobs.

The following tasks were performed to eventually get the SharePoint Search functionality back on line.

  1. initial Errors and attempted fixes

The following errors were displayed in the error log of the Search service application

  • An unrecognized HTTP response was received when attempting to crawl this item. Verify whether the item can be accessed using your browser.
  • The SharePoint item being crawled returned an error when requesting data from the web service

The attempts at fixing these were as follow:

 

  1. Disabling Loopback
  • On the SharePoint Server Click Start, click Run, type regedit, and then click OK
  • In Registry Editor, locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  • Right-click Lsa, point to New, and then click DWORD Value. (In Win 2008, its DWORD 32bit)
  • Type DisableLoopbackCheck, and then press ENTER.
  • Right-click DisableLoopbackCheck, and then click Modify.
  • In the Value data box, type 1 and click on Hexadecimal and then click OK.
  • Quit Registry Editor.
  • Restart SharePoint 2010 server.

     

  1. Adding the Start Address of the Crawl from the Content Source

Making this changes produced additional errors and also prevented the crawls from running

 

  1. Corrective actions

     

    The following activities were performed in order for the search and crawl service to be corrected.

    1. Completely delete the Search Service Application and Database.

So as to clear previous configuration errors, it has been recommended by Microsoft to sometimes rebuild the Search Service Application. An attempt at doing this previously did not produce the desire results and for this reason, a complete rebuild of the Search Service application including it's databases was made. The steps are as below:

Stop the Service Instances

  • Open SharePoint Management Shell as an administrator.

     

  • Clean up the Search Service Instances by typing Get-SPServiceInstance. This will show a list of all service instances. Notice the service instances with "SharePoint Server Search" listed in the title and note the GUIDs of those service instances as they will need to be disabled.

 

  • After noting them enter the following command Stop-SPServiceInstance -Identity "GUID of Search Service Instance".Repeat this for all of the Service Instance related to the SharePoint Server Search

Clean Up the Service Applications

  • Use the command Get-SPServiceApplication. This will show a list of all the Service Applications.

     

  • Run the command Get-SPServiceApplication |?{$_.name -eq "<name of the search application>"}. This will show you all the details of the Search Services Application. Note down the GUIDs of the Search Databases i.e. CrawlStoreDB, SearchDB and PropertyStoreDB. You will need these when you come to deleting the database.

 

  • Locate the Search Search Service Application and if listed use the following command to remove it :

    stsadm -o deleteconfigurationobject -id "GUID of Search Service Application"

     

  • Use the command Get-SPServiceApplicationProxy. This will show the Services Application proxies. Locate the one related to the Search Service Application if listed use the following command to remove it :

    stsadm -o deleteconfigurationobject -id "GUID of Search Service Application"

     

Delete Databases

  • Run the command Get-SPDatabase. This will list all databases that are used on the server and will also list the GUID's. Make sure you select the ones pertaining to search i.e. CrawlStoreDB, SearchDB and PropertyStoreDB.
  • Enter the command

    $SearchDB = Get-SPDatabase "GUID of database to delete"

     

    And then Enter SearchDB.Delete()

    This will permanently delete those databases in the SharePoint Farm.

     

  • Delete the index files from Program Files\Microsoft Office Servers\14\Data\Office Servers\Applications

After these activities are complete, a new search service application can now be built.

  1. create a new Search Service Application and Database.

     

  • Create a new search service application by clicking on Central Administration | Application Management | Manage Service Applications | New | Search Service Applications
  • Enter the Service Application Name | Use the Correct Search Service Account (and not the Farm Account), Use One Application Pool and then click on Okay. The New Search Service Application will now be created and it's databases will also be created automatically.
  • Launch the Search Services Application and click on Content Sources | Local SharePoint Sites | Edit
  • Check that all the sites host names are listed in start address. All of the SharePoint sites host names will be listed.
  • Scroll down to the list and check any of the secured host name. They will be noted as sps3://<SharePointSiteUrl>. Change this to read sps3s://<SharePointSiteUrl> as it is a secure site.
  • Click on Farm Search Administration. Make the following changes to the Farm – Level Search Settings as below. Ensure "Do not connect by using a proxy server" is selected.

  1. Change the firewall settings.

The Windows Firewall settings had been set to on and this could have possibly caused crawl issues as well. A firewall may already been in use which could potentially cause conflicts. From the SharePoint Server, click on Start | All Programs | Windows Firewall Advance Settings and change all the Firewall settings to "Off".

 

 

  1. Restart the server.

 

  1. Perform a full crawl and check for failures

Comments

There are no comments for this post.