Sitecore 8.1 and Solr6.6.0 error while rebuilding the search index.

Hi guys, i'm facing with an error message while i'm trying to Rebuild search index.

I'm using Sitecore8.1 and Solr 6.6.0,

Hope someone can help me this this issue, thank you !!!

 


Error message

=========================================================

Job started: Index_Update_IndexName=sitecore_web_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">java.time.format.DateTimeParseException</str></lst><str name="msg">Invalid Date in Date Math String:'2015-11-12T09.28.37Z'</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.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 parameters)
   --- End of inner exception stack trace ---
   at SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 parameters)
   at SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s)
   at SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd)
   at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddRange(IEnumerable`1 group, Int32 groupSize)
   at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.Commit()
   at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.PerformRebuild(Boolean resetIndex, Boolean optimizeOnComplete, IndexingOptions indexingOptions, CancellationToken cancellationToken)
   at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.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.Jobs.Job.ThreadEntry(Object state)


=========================================================

  • It seems date time format is not correct for any of your dynamic field. Solr only support yyyy-MM-dd'T'HH:mm:ss'Z' date time format. Please check with your custom configurations what Date time format you applied on that.

    Did you indexing any of your custom date time field if yes what date time format you are providing to that?
  • In reply to Yogeshwer Sharma:

    Thanks for the response Mr. Yogeshwer Sharma

    I'm new to Sitecore, do not know exactly how the indexes were set up, but I have not done any custom indexing at all.

    It's very strange that a colleague of mine has just done that together, but he got reindexing.
    Does it have anything to do with the computer itself?
  • In reply to Nattaphong Klinjan:

    It's nothing to do with Computer....only thing is Solr should be installed on machine. Please copy schema.xml from your colleague machine to your solr set up and check if it works for you. I think you are missing with any of the step.
  • Solr 6.6.0 Uses Managed Schema by Default and if you would like to switch to manually editing a schema.xml file, you should take the following steps:

    1. Rename the managed-schema file to schema.xml
    2. Modify solrconfig.xml to replace the schemaFactory class.
    a. Remove any ManagedIndexSchemaFactory definition if it exists

    <!-- An example of Solr's implicit default behavior if no schemaFactory is explicitly defined.-->
    <schemaFactory class="ManagedIndexSchemaFactory">
    <bool name="mutable">true</bool>
    <str name="managedSchemaResourceName">managed-schema</str>
    </schemaFactory>

    b. Add a ClassicIndexSchemaFactory definition as shown below

    <schemaFactory class="ClassicIndexSchemaFactory"/>

    3. Reload the core(s).

    Ravindra Giri
  • In reply to Yogeshwer Sharma:

    Hi, I've tried your suggestion, but it still does not work. It is very strange that it will not work.
  • In reply to Ravindra Giri:

    Hi Ravindra

    The solrconfig.xml file already looks correct, it has <schemaFactory class="ClassicIndexSchemaFactory"/> already and without <schemaFactory class="ManagedIndexSchemaFactory">
  • In reply to Nattaphong Klinjan:

    Is it possible this is a system language culture issue? Since you mentioned a colleague has it working, I am wondering if a language culture on your machine is causing the date to be exported in a different format

  • In reply to Yogeshwer Sharma:

    I agree with Yogesh. It is using a dot instead of what should be a colon for the separator between hours, minutes and seconds. I'd check your SOLR logs and see if you can pinpoint which field it is having a problem with. You also might find additional information in the Sitecore crawling logs.

    Justin
  • Problem solved by inserting patch ! Patch: Sitecore.Support.178247.config 

    Patch contain somthing like ...
    <indexFieldStorageValueFormatter>
    <converters>
    <converter handlesType="System.DateTime" typeConverter="Sitecore.ContentSearch.Converters.IndexFieldUTCDateTimeValueConverter, Sitecore.ContentSearch" set:typeConverter="Sitecore.Support.ContentSearch.Converters.IndexFieldUTCDateTimeValueConverter, Sitecore.Support.178247"/>
    </converters>
    </indexFieldStorageValueFormatter>