Wednesday, February 13, 2008

SharePoint Search Service cannot find hosts file

I have been trying out various scenarios on a dev farm consisting of 2 SharePoint servers and a SQL box to see what happens...

If you start mucking around with search services and stop or change your search index server you may come accross the following error:

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: Could not find file 'C:\WINDOWS\system32\drivers\etc\HOSTS'.

This is because the Sharepoint Timer job deletes the hosts file after you modify the web front end the crawler is pointed to. I created a new hosts file in 'C:\WINDOWS\system32\drivers\etc\' and then came across the next error:

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied.

To solve this update the permissions on the 'C:\WINDOWS\system32\drivers\etc' directory for the WSS_Admin_WPG account allowing the following advanced permissions:
  • Traverse Folder / Execute File
  • List Folder / Read Data
  • Read Attributes
  • Read Extended Attributes
  • Create Files / Write Data
  • Read Permissions
  • Delete Permissions
The delete permission also needs to be given because the timer job actually deletes and recreates the hosts file.

3 comments:

  1. Thanks! Solved my problem

    ReplyDelete
  2. This worked for me, Thank you very much for your solution. I was already going to delete my SSP because it was not Quering at all. After I made that change, now I don't have that error any more.

    Thank you so much!!!

    ReplyDelete