0

We are able to successfully build all the indexes for the first time except sitecore_master_index, sitecore_web_index and Sitecore_core_index

And when trying to rebuild sitecore_master_index for the first time, getting error as mentioned https://community.sitecore.net/general/f/11/t/8902

Already implemented the solution posted on above question. But now getting a different exception while rebuilding as mentioned below:

Job started: Index_Update_IndexName=sitecore_master_index|#
Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. 
---> SolrNet.Exceptions.SolrConnectionException: 
    <?xml version="1.0" encoding="UTF-8"?>
    <response>
        <lst name="responseHeader">
            <int name="status">400</int>
            <int name="QTime">1</int>
        </lst>
        <lst name="error">
            <lst name="metadata">
                <str name="error-class">org.apache.solr.common.SolrException</str>
                <str name="root-error-class">org.apache.solr.common.SolrException</str>
            </lst>
            <str name="msg">Solr instance is not running in SolrCloud mode.</str>
            <int name="code">400</int>
        </lst>
    </response>
 ---> 
System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at HttpWebAdapters.Adapters.HttpWebRequestAdapter.GetResponse()
   at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest request)
   at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable 1 parameters)
   --- End of inner exception stack trace ---
   at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable 1 parameters)
   at SolrNet.Impl.SolrCoreAdmin.SendAndParseHeader(ISolrCommand cmd)
   at Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrCloudSearchIndex.CreateAlias(String aliasName, String collection)
   at Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrCloudSearchIndex.SetAlias(String aliasName, String collection)
   at Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrCloudSearchIndex.SetAliasesConfiguration()
   at Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrCloudSearchIndex.Rebuild(Boolean resetIndex, Boolean optimizeOnComplete)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
   at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Jobs.Job.ThreadEntry(Object state)

Please suggest what to do?

Thanks

  • 1
    On seeing your error, it seems it is not able to process the index from solr. How are you running solr? Because I see the following error message in the log "Solr instance is not running in SolrCloud mode". Have you tried hitting the solr instance separately and getting the solr admin panel before rebuilding index? Please check that once and check for any errors in "Logging" section in solr admin panel before running the indexes.. Thanks Vijay – Vijayarajan Apr 4 '18 at 15:36
  • 1
    If you are using solr cloud make sure that all the instances are up. Check the zookeeper. Once the zookeeper is on, restart the solr service and then try rebuilding the indexes again. – Hishaam Namooya Apr 4 '18 at 20:44
1

The issue is now resolved, actually by mistake we enabled Sitecore.ContentSearch.SolrCloud.SwitchOnRebuild.config.example and after disabling it again indexes rebuild successfully.

| improve this answer | |
  • 1
    Yeah most of the times these issue occur enable/disable/edit of configuration. – FHN Apr 5 '18 at 12:34
1

For me, the solution was obvious once I reviewed the Solr error logs. I was quickly able to see that one of my switch-on-rebuild collections was missing. Creating the missing collection solved the problem.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.