Try our conversational search powered by Generative AI!

Search issues with EpiServer 8.5

Vote:
 

Hi All,

We are currently experincing an issue with a EpiServer 8.5 site we have pushed to production.

Running a search query returns no results.

Calling /IndexingService/IndexingService.svc/update/?accesskey=local in the browser returns "Method not allowed." as expected.

Calling /IndexingService/IndexingService.svc returns "Endpoint not found." as expected.

In the logfile we get the following errors

2015-05-20 16:45:39,409 ERROR [28] EPiServer.Logging.LoggerExtensions.Log - Could not get search results for uri '...bigLongUrl...'. Message: The remote server returned an error: (404) Not Found.   at System.Net.HttpWebRequest.GetResponse()
   at EPiServer.Search.RequestHandler.MakeHttpRequest(String url, NamedIndexingServiceElement namedIndexingServiceElement, String method, Stream postData, Action`1 responseHandler)
   at EPiServer.Search.RequestHandler.GetSearchResults(String query, String namedIndexingService, Collection`1 namedIndexes, Int32 offset, Int32 limit)
2015-05-20 16:45:42,885 ERROR [24] EPiServer.Logging.LoggerExtensions.Log - Could not get search results for uri '...bigLongUrl...'. Message: The remote server returned an error: (500) Internal Server Error.   at System.Net.HttpWebRequest.GetResponse()
   at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
   at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
   at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
   at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)
   at System.Xml.DtdParser.ParseExternalSubset()
   at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
   at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
   at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
   at System.Xml.XmlTextReaderImpl.ParseDtd()
   at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XmlReader.MoveToContent()
   at System.Xml.XmlReader.IsStartElement(String localname, String ns)
   at System.ServiceModel.Syndication.Atom10FeedFormatter.CanRead(XmlReader reader)
   at System.ServiceModel.Syndication.SyndicationFeed.Load[TSyndicationFeed](XmlReader reader)
   at EPiServer.Search.RequestHandler.<>c__DisplayClass6.b__4(WebResponse response)
   at EPiServer.Search.RequestHandler.MakeHttpRequest(String url, NamedIndexingServiceElement namedIndexingServiceElement, String method, Stream postData, Action`1 responseHandler)
   at EPiServer.Search.RequestHandler.GetSearchResults(String query, String namedIndexingService, Collection`1 namedIndexes, Int32 offset, Int32 limit)

Relative parts of the web.config are:


	
	  
		
	  
	
	
	  
	


	
	  
	
	
	  
		
	  
	

	
	  
	
	
	  
		
		  
		
	  
	



I have deleted the [appDataPath]\Index folder, which does get recreated, however the only files that get regenreated are

Index\Main\segments.gen
Index\Main\segments_1
Index\Ref\segments.gen
Index\Ref\segments_1

While in other Episerver 8 sites there are additional _dir files in Main, they are not recreated in the site we are having issues with.

Any pointers on what to try next?

Thanks!

#121895
May 20, 2015 9:52
Vote:
 

There is a "hidden" user interface to see when the site was indexed and with a button that triggers reindexing:
http://yoursite/EPiServer/CMS/Admin/IndexContent.aspx

Go there and reindex the site and it might start to work

#121900
May 20, 2015 10:17
Vote:
 

Read more here:

http://world.episerver.com/Forum/Developer-forum/EPiServer-7-CMS/Thread-Container/2013/2/EPiServer-Search/

#121901
May 20, 2015 10:17
Vote:
 

Thanks for your reply. 
I had tried this, and while the "Latest complete indexing" updates after running it, the issue still remains. Also the [appDataPath]\Index remain unchanged.

#121902
May 20, 2015 10:23
Vote:
 

Are you on a load balanced enviroment? 

#121909
May 20, 2015 12:26
Vote:
 

No, the server is not load balanced.

I ended up lodging a support ticket with EPiServer who solved the problem. ( Big thanks to EPiServer supporty who solved this so quickly! )

There was actually another error in the log stating

ERROR [19] EPiServer.Logging.LoggerExtensions.Log - No match for client IP xxx.xxx.xxx.xxx. Access denied for access key local.

We never linked this with the search issue as it does not mention anything about search.

What was happening is the website was trying to access the search service on the servers extenal IP Address. The search service was denying the request as it only accepts requests on local addesses.

The fix was adding the ipAddress attribute to the indexing service clients config and setting it to the servers external address:

 <episerver.search.indexingservice>
    <clients>
      <add name="local" description="local" ipAddress="xxx.xxx.xxx.xxx" allowLocal="true" readonly="false" />
    </clients>
    <namedIndexes defaultIndex="default">
      <indexes>
        <add name="default" directoryPath="[appDataPath]\Index" readonly="false" />
      </indexes>
    </namedIndexes>
  </episerver.search.indexingservice>

A cleaner solution which also works is to set the sites domain to the servers local ip address in the servers hosts file.

#121935
May 20, 2015 23:11
Vote:
 

The documentation (http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Search/Installing-and-deploying-Search-Service/) is a little misleading:

"The default configuration is set to allow local connections, that is, requests originated from the same server are allowed. If the Search service is deployed to another machine than the site then the attributes ipAddress and ip6Address can be used as specified below"

Since our searcg service was not deployed to another machine, we overlooked that setting.

I belive is should be somthing like

"The default configuration is set to allow local connections, that is, requests originated from the same server are allowed. If the Search service is deployed to another machine than the site or the namedIndexingService uri does not resolve to a local address then the attributes ipAddress and ip6Address can be used as specified below"

Also the error 

ERROR [19] EPiServer.Logging.LoggerExtensions.Log - No match for client IP xxx.xxx.xxx.xxx. Access denied for access key local.

Should state "Search access denied", or expliciy stating this error is realted to the search indexer.

#121936
May 20, 2015 23:20
* 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.