Exception While Handling Sitecore ContentSearch IndexingFinishedEvent, Index Was Not Found

Description

On your Sitecore Content Delivery Server, in your Sitecore logs, you see many occurrences of this message:

Heartbeat ERROR Exception while handling event Sitecore.ContentSearch.Events.IndexingFinishedEvent
Exception: System.ArgumentException
Message: Index my\_Index was not found
Source: Sitecore.ContentSearch
​
at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)
at Sitecore.ContentSearch.Maintenance.EventHub.UpdateIndexTimestampDirectHandler(Object sender, EventArgs args)
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object\[\] parameters, EventResult result)
at Sitecore.Events.Event.RaiseEvent(String eventName, Object\[\] parameters)
at Sitecore.ContentSearch.Maintenance.EventHub.<Initialize>b\_\_b(IndexingFinishedEvent event)
at Sitecore.Eventing.EventProvider.RaiseEvent(Object event, Type eventType, EventContext context)

Explanation

This is an error in the configuration of Sitecore itself.

The error message is caused because <MY_INDEX> is defined in the Content Authoring server configuration but not in the Content Delivery server.

Resolution

The first thing to do is to find the <MY_INDEX> index on the Content Authoring Server. To do so:

  1. On the Content Authoring Server, do a Sitecore showconfig (http://<INSTANCE_HOSTNAME>/sitecore/admin/showconfig.aspx).

  2. Search for the index that’s displayed in the Sitecore log (in this case, <MY_INDEX>).

  3. Determine in which configuration file the index is located.

  4. On the Content Delivery Server, edit the related configuration file by adding the reference to the missing index.

What's Next for Me?