Unable to perform search in Elasticsearch, error "Failed sniffing cluster state."

I have been facing a strange problem with Elasticsearch where only Search API fails with message "Failed sniffing cluster state.". Other APIs like Bulk and CreateIndex etc work fine. The code works in other systems also, so I am pretty sure its a problem with my local system only. Here are the details:

I am using a SniffingConnectionPool to create an ElasticClient. The Elastic cluster is setup in a different machine, when I work with an elastic instance setup in the same machine where my code runs, everything again works fine.

Here is the stack trace of various exception objects I found in the response returned:

Unsuccessful low level call on GET: /_nodes/http,settings?timeout=2s&flat_settings=true
# Audit trail of this API call:
# OriginalException: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
   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 Elasticsearch.Net.HttpConnection.Request[TResponse](RequestData requestData)
# Request:
<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
# Response:
<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>


No connection could be made because the target machine actively refused it 127.0.0.1:8888


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)

Please suggest some solution of at-least methods to debug it further and find solution to the problem.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.