Episerver.search is not working (CMS v9)

Vote:
 

Hello!

I just started working at a company and they are using Episerver for their website. I am new to episerver, so I am learning a lot at the moment but it seems that I can not figure this one out.

The search (not find) stopped working some time ago. I does work when I search for an id. 

Current situation:

  • Episerver.CMS v9.8.2
  • Episerver.search v8.0.0
  • Windows Server 2012 R2
  • IIS v8.5
  • Site is using a SSL certificate
  • App_Data folder is outside the site folder

An idea is to update episerver, but this is not on the priority list at the moment, but fixing the search in the current CMS version is.

At this point I have tried all the solutions I could find here, for example:

  • changing the hosts file
  • changing the baseURI for "/indexingservice/indexingservice.svc"
  • removing the content of the Index folder
  • renaming the Index folder in Web.config
  • removing the folders from the Index folder
  • clearing the db table "tblIndexRequestLog"
  • restarting App Pool and IIS site
  • running https://[domain]/episerver/cms/admin/indexcontent.aspx
  • SSL related changes

All ended up with the same errormessage in EPiServerErrors.log. What I did not tried yet is to create a seperate site for just the search index to see if it might have something to do with a https redirect.

EPiServerErrors.log

2020-02-12 12:27:50,749 [43] DEBUG EPiServer.Search.RequestQueueHandler: Start dequeue unprocessed items
2020-02-12 12:27:50,785 [43] DEBUG EPiServer.Search.RequestQueueHandler: Start processing batch for indexing service 'serviceName'
2020-02-12 12:27:50,789 [43] ERROR EPiServer.Search.RequestHandler: Update batch could not be sent to service uri 'https://[domain]/IndexingService/IndexingService.svc/update/?accesskey=local'. Message: 'The underlying connection was closed: An unexpected error occurred on a receive. at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at EPiServer.Search.RequestHandler.MakeHttpRequest(String url, NamedIndexingServiceElement namedIndexingServiceElement, String method, Stream postData, Action`1 responseHandler)
at EPiServer.Search.RequestHandler.SendRequest(SyndicationFeed feed, String namedIndexingService, Collection`1 ids)'
2020-02-12 12:27:50,790 [43] ERROR EPiServer.Search.RequestQueueHandler: Send batch for named index 'serviceName' failed. Items are left in queue.
2020-02-12 12:27:50,790 [43] DEBUG EPiServer.Search.RequestQueueHandler: End dequeue unprocessed items

Web.config

<episerver.search active="true">
    <namedIndexingServices defaultService="serviceName">
      <services>
        <add name="serviceName" baseUri="https://[domain]/IndexingService/IndexingService.svc" accessKey="local" />
      </services>
    </namedIndexingServices>
    <searchResultFilter defaultInclude="true">
      <providers />
    </searchResultFilter>
  </episerver.search>
<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <bindings>
      <webHttpBinding>
        <binding name="IndexingServiceCustomBinding" maxBufferPoolSize="1073741824" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
          <security mode="Transport">
            <transport clientCredentialType="None">
            </transport>
          </security>
          <readerQuotas maxStringContentLength="10000000" />
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>
<episerver.search.indexingservice>
    <clients>
      <add name="local" description="local" allowLocal="true" readonly="false" />
    </clients>
    <namedIndexes defaultIndex="default">
      <indexes>
        <add name="default" directoryPath="[appDataPath]\Index" readonly="false" />
      </indexes>
    </namedIndexes>
  </episerver.search.indexingservice>
  <location path="IndexingService/IndexingService.svc">
    <system.web>
		<authorization>
			<allow  users="*" />
		</authorization>
		<httpRuntime maxQueryStringLength="65536" />
    </system.web>
    <system.webServer>
      <security>
        <requestFiltering>
          <requestLimits maxQueryString="65536" />
        </requestFiltering>
      </security>
	  <httpErrors existingResponse="PassThrough" />
    </system.webServer>
  </location>

Is there anyone that could help me?

#216996
Feb 12, 2020 11:48
Vote:
 

Hi Rob,

Have you tried the troubleshooting steps given on below post -

https://hanskindberg.wordpress.com/2015/07/04/troubleshooting-episerver-search-indexing-service/

And please make that you configured your search correctly if you are using https

https://www.dcaric.com/blog/how-to-configure-episerver-search-with-https

#216999
Edited, Feb 12, 2020 12:57
- Feb 12, 2020 14:47
Hi Ravindra,

Thanks for your reply. I tried both posts but with the same results.
Vote:
 

Hi and thanks for your replies!

I tried them out just to be sure that I didn't missed anything. But with the same result... I thought this was a bit weird, so I finished setting up a developmentserver with the same configuration as the production server and I then succeeded in recreating the same error message! The search was working before, but now it didn't and I guess the major difference was that the site was now running on https.

I tried the SSL related solutions again, but no luck. The search only worked on http. Because the site has rewrite rules that redirects to https, the search kept failing. So as a workaround I have created a new project in VS with only the episerver.search package installed, created a "local" site in IIS (running on http) with a corresponding domain in the "hosts" file. Changed the site so it uses the new "search" site and it worked!!!

I haven't installed this on the productionserver, so that's my next step.

#217057
Feb 14, 2020 8:52
Vote:
 

For me I usually do like this when using Episerver Search since it is the most stable way to set it up I think

https://world.episerver.com/blogs/Henrik-Fransas/Dates/2015/8/setup-episerver-search-in-a-future-safe-and-stable-way/

#217107
Feb 17, 2020 7:06
- Feb 17, 2020 8:10
Do you, by any change, know a site where I can find documentation about Episerver Search and how to query Lucene? I like to sort the results by publishing date but I haven't found good documentation about it.
Vote:
 

Hi Henrik,

Thanks for your message! That is exactly what I have done, exept for the loadbalanser part, we don't have that. I haven't figured out what the problem is, but a combination of an older episerver version (+ it's packages) and an up-to-date Windows Server, is not working together well I suppose.

I first tested in development and after rolled it out to production and it is working now!

#217108
Feb 17, 2020 8:07
Vote:
 

Great to hear that it workes and yes, that might be a problem since the Episerver Search is not something that is the most updated part of Episerver.

#217110
Feb 17, 2020 8:13
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.