Gravatar for pavan.omtri@towerswatson.com

Question by psomtri, Apr 20, 2015 6:51 PM

Rest end point 400 bad request

On Coveo diagnostics page I am getting the following error Coveo Search REST Endpoint () The remote server returned an error: (400) Bad Request.
Coveo Security Service The remote server returned an error: (500) Internal Server Error.

In Sitecore logs I see these related errors, It worked on my local machine , I am having this issue on my DEV server.

Exception: System.Net.WebException
Message: The remote server returned an error: (400) Bad Request.
Source: System
   at System.Net.HttpWebRequest.GetResponse()
   at Coveo.SearchProvider.Applications.StateVerifier.<>c__DisplayClassd.<GetRestEndpointState>b__c()
   at Coveo.SearchProvider.Applications.BaseVerifier.VerifyComponent(Func`1 p_VerifyMethod, String p_ComponentName)

ManagedPoolThread #6 17:39:39 INFO  Trying to load XML configuration /App_Config/Security/GlobalRoles.config
7256 17:39:40 ERROR Application error.
Exception: System.InvalidOperationException
Message: Request format is unrecognized for URL unexpectedly ending in '/GetVersion'.
Source: System.Web.Services
   at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2 Replies
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Apr 21, 2015 9:35 AM

I don't think the second error is related to Coveo.

  • Does your CES, Search API and Coveo for Sitecore versions are matching (same release month)?
  • Is your <SearchApiUri> element value correct in your Coveo.SearchProvider.Rest.config file?
  • Is your <ApplicationSecret> element value correct in your Coveo.SearchProvider.Rest.config file?
  • Is your <RestEndpointPath> element value correct in your Coveo.SearchProvider.Rest.config file? It should be /coveo/rest.
Gravatar for pavan.omtri@towerswatson.com

Comment by psomtri, Apr 21, 2015 11:08 AM

Thanks, I have checked every thing you mentioned Coveo.SearchProvider.Rest.config, they all were correct. While doing this checks I noticed config.yml in the Coveo API install folder was missing paths to certificates. Once I fixed the certificate paths the Rest End Point error did go away.

I still get 500 internal error on "Coveo Security Service".

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 21, 2015 11:14 AM

Coveo Security Service is the webservice installed by Coveo for Sitecore inside Sitecore to expand Sitecore role members at indexing time. It is meant to be called by the CES Security Provider with the Sitecore credentials defined in the Coveo.SearchProvider.config file <SitecoreUsername> and <SitecorePassword> elements.

I think your configured credentials are invalid. You can update them from the Sitecore Control Panel (see Configuring the Sitecore Credentials).

Gravatar for dsoriano@littelfuse.com

Answer by Dean, Sep 2, 2015 9:40 AM

Might help someone, I've recently ran into the same issue and everything checks out in the configs, etc. The solution to my issue was to change the Coveo Search API service login account to a domain service account with full control on the CES folders.

Ask a question