Diagnose Solr connectivity issues on production

This blog post is for you if you find the following warnings in Sitecore logs:

  • [Index=<indexname>] Crawling Paused
  • [Index=<indexname>] Synchronous Indexing Strategy is disabled while indexing is paused.
  • IndexingStateSwitcher: Indexing is not resumed since indexes have not been initialized yet…
  • Exception: SolrNet.Exceptions.SolrConnectionException, Message: Unable to connect to the remote server

You can see from these log messages that something is really not right with Solr or SolrCloud.

What happened in my case:

  1. Sitecore could not reach our SolrCloud
  2. After the second try Sitecore paused indexing for each indexes
  3. After Sitecore could reach our SolrCloud again, it tried to initialize the indexes but it failed for one index because of a wrong configuration (typo in the core name)
  4. Because of the failure of one index, Sitecore kept the indexing paused

How did I diagnose this? I implemented a small Razor view where I asked the following things from Sitecore:

  • Current status of Solr connection
  • Last status of Solr connection which saved
  • Get Solr indexes and their IsInitialized property
    • If an index is IsInitialized=false, then tried to initialize

I copied this file to the production CM server (it does not cause an application restart) to the sitecore/admin folder and then called the <domain>/sitecore/admin/solr-diagnostic.cshtml.

Don’t forget to delete this file after you are done with the diagnose!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s