Fixing MOSS Search

Had a client today (last week now) who broke search all the way. And in their attempts to straighten it out they changed some pieces that weren’t broken. Then while they were in the process of trying to put it all back together I called and said let me at it so they just stopped. Needless to say I picked up the farm in an odd state or more exactly Search was dead.

So the first step always when Search is broke is to go to the SSP Admin and check out things.

  1. Open the SSP Administration page
  2. Click on Search Administration and see what it has to say. (if you don’t see Search Administration this means you have not installed the infrastructure update. I would highly recommend at a minimum you have that installed. Get the latest update install guide here)

When I opened the page I saw a Crawl status of Error. That is about worthless.

That is pretty much as generic as they come. You get the same Error when the server is on fire as you do when there is small hiccup. So a much better thing to do is:

  1. Go back to the SSP administration page
  2. Click on Search Settings (which is what we used pre infrastructure update)

This page does a much better job of giving you tangible errors. Here is what I got:


Error: An indexer is not assigned to the Shared Services Provider ‘SharedServices1’.

Link to: Configure an indexer and a search database for this Shared Services Provider

Well that is fixable but how did they end up like this? They stopped the Indexing service in the farm by:

  1. Go to Central Admin
  2. Click on Operations
  3. Click Services on Server
  4. They choose their Index server
  5. Then clicked Stop to the right of Office SharePoint Search Service

This doesn’t just stop the service. This actually removes the service completely. This also removes the Index server from any SSP configured to use it. Now if you did want to just start and stop the service there is a way to do this:

  1. Open a command prompt
  2. Type net stop osearch and press enter
  3. Type net start osearch and press enter

This will cycle the search service. Usually the only time you need to do something like this is after installing a new ifilter but sometimes it makes you feel better to give it a shot and see if that helps your problem. I do it more often than I should just for that reason.

Back to the task at hand clearing up that error! I double checked and they had already reconfigured the Office SharePoint Search Service on the Index server so all I need to do is go back to the Index server and re-associate the indexer.

  1. From Central Administration click on Shared Services Administration from the left hand side of the page.
  2. Hover over the SSP name, click the drop down arrow and click Edit properties

  1. Scroll to the bottom of the page and select your Index server from the Index Server dropdown. If you see No Indexers in red you need to go back to your Services on Server and make sure you have the Office SharePoint Search service started and configured for the Index role.
  2. Confirm that you have the correct index location. Usually the C: drive is less than ideal.
  3. Click Ok

The SSP is now configured with an Indexer. Let’s go make sure Search is happy.

  1. Now click on the Shared Services Provider name to open the SSP admin site.
  2. Click Search Settings

Don’t be surprised if you get this error:

Error: The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.

Typically this is because the wheels of Search can move slowly. I have seen this error come up for 10 minutes or so in some farms. What Search is really telling you is it is busy getting the index and the database ready to go so you can start indexing. Be patient grass hopper. At the client this was gone after about 2 minutes.

Once I was able to get to a happy Search Settings page I went ahead and reset the Index back to zero. Not always necessary but they had 33,000 items in the index and 140,000 or errors. I thought better to start everything back to 0.

In order to reset the Index.

  1. From the SSP admin screen click Search Administration
  2. From the left hand column (quick launch for those who know terminology) click Reset all crawled content
  3. Select Deactivate search alerts during reset
  4. Click Reset now

Now you have a completely blank index. Why did we choose to deactivate search alerts? This is to keep from annoying the users. We don’t want them all to get new alerts when new content is discovered when we recrawl in a minute. Once the index is back to normal we will re enable the alerts for them.

Ok so now the next step should be doing a full crawl. So let’s try that.

  1. From your SSP Administration home page click Search Administration
  2. From the Quick Launch bar (on the left) click Content Sources
  3. Hover over your Content Source, click the drop down arrow, and select full crawl
  4. Now go back to the home page of Search Administration and watch to see if the crawl is running

Unfortunately in our case after about a minute I was left with 0 items in the index and 3 errors. After checking the errors I got Access Denied. L If you haven’t done any monkeying around with changing your default content access account then it should have been automatically granted full access to your content source. You can confirm this by checking your Policy for web application in Central administration. If you forget how to do that check this blog post for a reminder.

If that checked out ok then the next thing I would check is to make sure your web application is set to integrated authentication and not basic authentication. MOSS will not pass basic authentication by default. So if you changed your web application from integrated to basic, so people users don’t have to enter their domain for example, then you need to setup a custom crawl rule to pass basic authentication.

  1. From your SSP Administration home page click Search Administration
  2. In the Quick Launch bar click Crawl rules
  3. Click New Crawl Rule
  4. For path enter your web app URL ex:*
  5. For Crawl Configuration select Include all items in this path
  6. For Specify Authentication select Specify a different content access account
  7. Now fill in username and password remembering your domain\username form. I would recommended using your normal search account as you know it already has read access to the content.
  8. Key step de-select the box to Do not allow Basic Authentication
  9. Now do a full crawl. Also, remember if you have multiple web apps you may need more than one of this rules.

For the client this was not this issue but it is an important and often over looked troubleshooting step so I thought throwing it in here would be helpful.

The next thing I take a look at is the dreaded loopback fix. I showed this one to Todd Klindt one time and he wrote a nice post on the issue and a like to the KB for fixing it. It is all but a guarantee these days if you have the WFE and Index role on the same server you are going to need to do this. A lot of farms have ran fine for a long time and just recently they have started requiring it. Must have been a Windows update that is causing this to be needed more but I haven’t identified it. Another note even though this fix is only listed as applying to Windows 2003 it also applies to Windows 2008, had a different client need it last week. J

Loopback fix in and the server rebooted I tried another Full crawl. Success! Seems this was the root of their issues but as is often the case that happens to all of us, trying to fix it only made the problem worse. LOL

Don’t forget to re-enable those search alerts.

  1. From your SSP administration home page click Search Administration
  2. In the System Status section in the center of the page click Search alerts status Enable

Another troubleshooting step I skipped, because the client had already done it was resetting search permissions. Read the blog post John Ross did summing up the steps to get permissions back on the up and up for the Search Service.–-thanks-conficker-scare.aspx

Something I learned that was new

I am guessing since I didn’t realize this is an option (or more probably I knew and forgot) you probably didn’t either. So run stsadm –o help like below and take a look at the output.

Use Stsadm.exe from the 12 hive (c:\program files\common files\Microsoft shared\web server extensions\12\). Actually 12\bin to be exact.

C:\ >stsadm -help osearch

stsadm -o osearch

[-action <list|start|stop|showdefaultsspadmin>] required parameters for ‘start’ (if not already set): role, farmcontactemail, service credentials

[-f (suppress prompts)]

[-role <Index|Query|IndexQuery>]

[-farmcontactemail <email>]

[-farmperformancelevel <Reduced|PartlyReduced|Maximum>]

[-farmserviceaccount <DOMAIN\name> (service credentials)]

[-farmservicepassword <password>]

[-defaultindexlocation <directory>]

[-propagationlocation <directory>]

[-cleansearchdatabase <true|false>]

[-ssp <ssp name>] required parameter for ‘cleansearchdatabase’

So really very similar to the options you have available to you from the GUI. The reason I used it was one of the Query servers was stuck in the starting state. In the GUI there is no stop until the service gets too started, not even a reboot will help. With stsadm you can do a stop and get out of the perpetual starting. J A very helpful trick.

If you are still fighting with Search here are couple of other Search troubleshooting things I wrote a while back

Hope you enjoy what feels like a small book


Shane – SharePoint Consulting

17 Comments so far

  1.   KattyBlackyard on June 14th, 2009          Reply

    Hi, gr8 post thanks for posting. Information is useful!

  2.   john beck mentoring on June 24th, 2009          Reply

    Hi, It was good reading your post! I’ve been hearing about John Beck’s program these days. My colleague also purchased the system to use it as a side business work.

  3.   Danny on June 26th, 2009          Reply


    quick question, when we reset the index what happens to content database size and logs? If it does not shrink, is it safe to remove the log file? will the system create a new log file? the reason i ask is because i’ve seen log files grow in size of GB!

    thanks for your time.

    pls respond back to

  4.   KonstantinMiller on July 6th, 2009          Reply

    Hello, can you please post some more information on this topic? I would like to read more.

  5.   RST on July 10th, 2009          Reply

    Hi, I am getting IE icon for all of my search results (for DOCX , XLS , PDF etc) , I am using MOSS 2007 , Any ideas ???

  6.   SMOSCOLFENE on July 22nd, 2009          Reply

    At the corner you should turn
    signature: acyclovir cheap seg6se98i

  7.   Denson Hamilton on November 24th, 2009          Reply

    I get error repeatedly.
    All I do is stop then start osearch using the -role for indexquery, then go in central admin and setup index server takes 10 minutes. I still cant figure out why it happens so often.

  8.   Buy Ambien on February 17th, 2010          Reply

    genres usethe meters tefra unacceptable taster atag extracts strikes mentors counterhttp
    saramartisakis kulturenostro

  9.   Learning german on February 18th, 2010          Reply

    If anyone here truly feels fiat currency is worthless then feel free to give me all your money.

  10.   AliceHju on March 3rd, 2010          Reply

    All hello. I want to ask council of purchase of medications on-line.
    Recently came upon such pharmacy in it all very cheap. I am surprised such prices.
    Did anybody order medications there? Can it them trust?

  11.   Benjamin Athawes on March 2nd, 2011          Reply
  12.   Venki on May 12th, 2011          Reply

    The Fix worked like a charm. Thanks for posting the fix. I had the same issue with my Search Server.
    I followed each step in your blog and resolved the search issue.

    I attended your SharePoint Administration session in SPTechCon 2010 in Boston


  13.   Mellie on May 14th, 2011          Reply

    AKAIK you’ve got the ansewr in one!

  14.   Binu on August 31st, 2011          Reply

    Hi After adding a couple new columns to the faceted search my search is giving this error

    Server Error in ‘/’ Application.

    Multiple controls with the same ID ‘ErrorIcon’ were found. FindControl requires that controls have unique IDs.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Multiple controls with the same ID ‘ErrorIcon’ were found. FindControl requires that controls have unique IDs.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [HttpException (0x80004005): Multiple controls with the same ID ‘ErrorIcon’ were found. FindControl requires that controls have unique IDs.]
    System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +11023498
    System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +269
    Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchFacets.InitClientScripts() +555
    Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchFacets.OnInit(EventArgs e) +761
    System.Web.UI.Control.InitRecursive(Control namingContainer) +143
    System.Web.UI.Control.AddedControl(Control control, Int32 index) +271
    System.Web.UI.WebControls.WebParts.WebPartManagerControlCollection.AddWebPartHelper(WebPart webPart) +305
    System.Web.UI.WebControls.WebParts.WebPartManagerControlCollection.AddWebPart(WebPart webPart) +1930590
    System.Web.UI.WebControls.WebParts.WebPartManagerInternals.AddWebPart(WebPart webPart) +63
    Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartWithRetry(WebPart webPart) +147
    Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddDynamicWebPart(WebPart webPart) +122
    Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts) +12053
    Microsoft.SharePoint.WebPartPages.SPWebPartManager.LoadWebParts() +93
    Microsoft.SharePoint.WebPartPages.SPWebPartManager.OnPageInitComplete(Object sender, EventArgs e) +690
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
    System.Web.UI.Page.OnInitComplete(EventArgs e) +11038910
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1674

    Any idea on fixing this

  15.   Cheap Generic Viagra on November 10th, 2011          Reply

    You are a Great while writing in the blogs it is awesome I liked it too much good and informative thanks for the sharing.

  16.   emma on September 10th, 2013          Reply

    Thanks…Hard to catch it out yet being an useful blog.

  17.   Jane on January 21st, 2014          Reply

    Hi, Shane,

    I like your article. My problem is: When I click “Search setting” at Sharepoint 2007 Shared Services Administration page, it said “Unknown Error”. Would you please let me know how to fix this broke link?

    My email address is

    Thanks you very much.

Leave a Reply