Unable to stop crawl and/or Index Reset SharePoint 2013 Search

I swear if you breath on SharePoint wrong, you will be in a world of hurt. Guess you guys figured by that statement, that I’m from Texas, huh? God Bless Texas!

My coworker did something very reasonable a couple of days ago by setting up a content source to crawl a WSS 3.0 farm from our SharePoint 2013 farm. Seemed like a fine idea until we tried to run a full crawl on our farm content source and it ran past the 27 hour mark when it usually takes less than 8. So something was stuck. Then the search was failing on all the sites. We were getting the infamous “Sorry but something is hosed, loser” error. Great.

Since the farm isn’t really in production yet, an intelligent course of action was to stop the crawl, do an Index Reset, and try to run another full crawl. I volunteered to do that deed late one night. Bad idea. Of course, nothing worked as planned.

IMPORTANT: Don’t forget to make sure you set all your crawl schedules to None before you start.

Issue number 1: Crawl stuck in Stopping. Tried to stop the crawl. It stayed in the Stopping state for about 15 minutes and then went to the “Sorry loser” error. So let’s kill the search service and see what happens. Now this should be a simple process but it isn’t. You need to stop the “SharePoint Server Search 15” on all the SharePoint servers in the farm. Do the following on all the SharePoint servers:

  1. Start -> Run -> Services.msc
  2. Find the “SharePoint Server Search 15” service. Right click and go to Properties.
  3. Select the Recovery tab.
  4. Set First Failure and Second Failure to “Take no action”. This is going to keep the service from restarting when you turn it off. This is very important.
  5. Click OK and then stop the service.
  6. Do this on all the servers.
  7. Check in CA and make sure the crawl is in the Idle state (it will be).
  8. Go back and turn the services back on for each server. While you are there, go ahead and set First Failure and Second Failure back to “Restart the Service”.

Now that the crawl is in Idle, it’s time to do an Index Reset. You can give it a try in CA but, in my case, it threw a “Sorry loser” error. This one is a little more painful to fix. Clear the SharePoint cache. Crap.

Issue number 2: Index Reset throws an error.

  1. Start -> Run -> Services.msc
  2. Find the “SharePoint Timer Service”, right click and select properties.
  3. Go to the Recovery tab and set all the Failures to “Take No Action”. This is very important.
  4. While you are there, stop the service.
  5. Do this for all SharePoint servers in the farm.
  6. Find the cache folder. It’s usually somewhere like C:\ProgramData\Microsoft\SharePoint\Config. Just do a search for the file cache.ini and that will be the right folder.
  7. Delete all the files in that folder EXCEPT Cache.ini.
  8. Open Cache.ini with Notepad and change the number to 1. You can make note of that number for later if you wish.
  9. Do this for all the SharePoint servers in the farm.
  10. No go back and turn on the “SharePoint Timer Service” on all the servers. You can put back the Failures their previous state at this time, too.
  11. Take a look in the cache folders and make sure they are filling up with new files. If you are ultra paranoid, you can compare the cache.ini number to the one you saved and make sure they are the same. I have no idea what you would do if they didn’t match.

Try doing the Reset Index again and it should work. It only takes a short amount of time, so if it hangs, clear the cache again and give it another try.

So there you have the painful process of clearing up your search crawls on SharePoint 2013. Next, we are going to discuss continuous crawls and why they are a good thing.

Until then, keep it real.

The Grumpy Guru

  1. #1 by brendon on September 10, 2014 - 9:41 am

    did you actually try this: 7.Check in CA and make sure the crawl is in the Idle state (it will be).

    if you stop all search services in the farm then the content source page fails to load, it needs a search service running to display.

    i’d like to know how to got this to stop, mine has been stuck on stopping for 8 hours now and have done multiple service stop start, server restarts, changed the topology, just about everything bar deleting the search service app.

  2. #2 by Dino2333 on January 14, 2015 - 4:27 pm

    Cache is not filling up again after restarting the service. I still cannot clear index.

  3. #3 by Qasim AlQaro on April 1, 2015 - 11:32 am

    Thanks aloot it worked for me.
    I was having an issue with crawl stuck in stopping.

  4. #4 by Dina Demara on April 23, 2015 - 9:00 pm

    Thank you for posting this. It turned out to be the correct answer for our company to fix a broken search.

  5. #5 by srinivasa reddy on April 24, 2015 - 2:03 pm

    Thank you so much. 🙂

  6. #6 by Greg on April 24, 2015 - 8:34 pm

    I think the KEY here for me was disabling the service restart. Awesome Post

Leave a comment