REST Endpoint and Security Service unable to connect to remote server
We've finished installing Coveo for Sitecore with CES and Search API on our Development environment. Sitecore and CES are hosted on different servers. As of right now, after following the instructions, I'm receiving a couple errors on the diagnostic page.
When I'm remoted into the CMS server and I check the diagnostics page I receive an error on "Coveo Search REST Endpoint ()" of "Unable to connect to the remote server".
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [IP address]:1080 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- 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)
When I connect to the Sitecore instance remotely, from my local machine, I receive the above error as well as the same error on the Coveo Security Service section.
From my local machine, in a browser, I can hit
http://[CMS host name]/coveo/rest and I receive the default JSON response with 0 results. When I go to
http://[CES Master Server]:8080/rest/search I get the standard JSON response. So this leads me to believe the search endpoint is configured correctly, but then the error above states otherwise.
Any ideas of a direction to look in?
This problem was troubleshooted in a support call. Here's the findings:
The "Coveo Search REST Endpoint ()" test of the Coveo Diagnostic Page is done by calling the Coveo for Sitecore REST endpoint proxy on the Sitecore instance at the address [Scheme+Host+Port of the current HTTP request]/coveo/rest
The same logic is done for the "Coveo Search Service".
Normally, the current HTTP request in the Sitecore web server has the same URL as the client web browser and the tests passes. In nickstephens setup, they have a proxy in front of their Sitecore servers that is redirecting the client HTTP requests to an internal IP address with a different port (1080). Thus, the current HTTP request on the Sitecore server was to that IP with the custom port. When the Sitecore server was calling http://InternalIP:1080/coveo/rest for the test, the response was a timeout.
This is a limitation of the Coveo Diagnostic Page that return false negative errors. Coveo will work to find a solution to that issue.