May 31, 2016

SharePoint 2010/2013 - Search Service stuck at "Error Starting" OR "Error Stopping"


Problem:
We ran into an issue wherein, when users search for specific content within SharePoint, users were not able to see the SharePoint search results. This issue was global for all web applications in the farm. To resolve this issue, we checked whether "SharePoint Server Search" service under "Manage Services on Server" in Central Admin was running or stopped. Now, here we found that "SharePoint Server Search" service was stuck at "Error Starting".

To identify the exact issue, we analyzed ULS logs and we found below error in the ULS.

"The Execute method of job definition Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition (ID a41c8bc6-6ee7-4039-b171-277686fc0b96) threw an exception. More information is included below.  Unable to cast COM object of type 'Microsoft.Office.Server.Search.Administration.MSSITLB.CGatheringManagerClass' to interface type 'Microsoft.Office.Server.Search.Administration.MSSITLB.IGatherManagerAdmin3'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{0FF1CE15-013A-0000-0000-000000000000}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))."

Solution: 
We tried many different ways to resolve this issue, but couldn't succeed. After some depth analysis and research, we found exact root cause of the error and solution.

Actually, Search Service is not able to locate a specific ".dll" at specified location.

Step -1: Now, let's find out what is going wrong. Copy the above highlighted GUID from your ULS log.

Step - 2: Open "regedit" from Run.

Step - 3: From the "Registry Editor" and press "Ctrl+F" and search the above highlighted GUID (This GUID is located under "HKEY_CLASSES_ROOT\Interface\").

Step - 4: Expand the Key, and select "TypeLib" and you will get something like following.

Step - 5: Note the new GUID located under "TypeLib" folder. And again search this GUID, as a result we will have same result as above, but with new GUID.

Step - 6: Now, this GUID will be something like "0FF1CE15-0001-11B0-0000-000000000000". This is the Key/GUID that holds our solution. This can be located under "HKEY_CLASSES_ROOT\TypeLib\".

Step - 7: Locate this Key/GUID ("0FF1CE15-0001-11B0-0000-000000000000") under "HKEY_CLASSES_ROOT\TypeLib\" and expand the Key. Then navigate to "1.0 > 0 > win32" and edit the below highlighted data.


Step -8: This property will have URL to "mssrch.dll" file. So update the URL with "C:\Program Files\Microsoft Office Servers\15.0\Bin\mssrch.dll\1" if you are running on SharePoint 2013 or with "C:\Program Files\Microsoft Office Servers\14.0\Bin\mssrch.dll\1" if you are running on SharePoint 2010.

That's it. Just delete the old search service and create the new one. Start a full crawl and we are good to go !!

If you have any questions you can reach out our SharePoint Consulting team here.

May 24, 2016

Setup Search Crawl in SharePoint 2013

If you want to configure Full/Incremental/Continuous search crawl, follow below steps:
1. On the Configure Search Settings page, in the Crawl Settings section, click Content sources and crawl schedules.
2. On the Manage Content Sources page, right click the content source for which you want to schedule an incremental crawl and then click Edit.
3. On the Edit Content Source page, in the Crawl Schedules section, do the following:
Incremental/Full crawl setup:

If an Incremental/Full crawl has never been created for this content source, click the Create schedule link below the Incremental/Full Crawl list.
   
-or-
If you are changing the Incremental/Full-crawl schedule, click the Edit schedule link below the Incremental Crawl list.
1. In the Manage Schedules dialog box, in the Type section, select Daily, Weekly, or Monthly.
2. In the Settings section, do the following:
   2.1 In the Run every box, type the number of days between crawls. For example, to schedule an incremental crawl to start every other day, type 2.
   2.2 In the Starting time list, select the time of the day from which to start the scheduled crawl.
   2.3 If you want to crawl more frequently than once a day, select the Repeat within the day box and type the number of minutes to wait between crawls in the Every box and type the total number of minutes in which to repeat the crawl within the same day in the For box. For example, if you select Repeat within the day and type 60 in the Every box and 720 in the For box, an incremental crawl of the content source you are configuring starts every 60 minutes up to 720 minutes (12 hours) after the first scheduled incremental crawl for this content source ran.
   2.4 Click OK.
3. Click OK in  Content Source page.

Continuous crawl setup:
1. Select the continuous crawl radio button in Crawl Schedule Section.
2. Click OK in  Content Source page.
Unlike an incremental crawl, which starts at a particular time and repeats regularly at specified times after that, a continuous crawl automatically starts at predefined time intervals. The default interval for continuous crawls is every 15 minutes.

To Change the Continuous crawl time do the following steps:

Prerequisite:
Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

Steps:
1. Start a SharePoint 2013 Management Shell.
2. In Windows PowerShell command prompt, type the following commands:
        $ssa = Get-SPEnterpriseSearchServiceApplication
        $ssa.SetProperty("ContinuousCrawlInterval",n)

Where "n" is the regular interval in minutes at which you want continuous crawls to start. The default interval is every 15 minutes. The shortest interval that you can set is 1 minute.

Note:
If you reduce the interval, you increase the load on SharePoint and the Crawler. Make sure that you plan and scale out of resources accordingly for this increased consumption .

If you have any questions you can reach out our SharePoint Consulting team here.

May 3, 2016

Web Application creation issue in SharePoint

Issue: Creating a Web Application from Central Admin sometimes continues to run forever and getting error message: "Please contact your System Administrator".


Resolution : Here are detailed steps to fix it.

1. Open IIS Manager.
2. Select correct Application Pool of Central Administration Site from “Application Pools”.
3. Right click and select Advanced Settings... and, look for “Shutdown Time Limits(seconds)".
4. Increase it to 1200. Note: Default value is 90 seconds
5. Click OK.
6. Do IISReset.
Finally, you should be able to create Web Application successfully without any issue.

If you have any questions you can reach out our SharePoint Consulting team here.