I'm seeing connection failures using Sniffing ConnectionPool , where parts of the elasticsearch cluster is only available on the http port, that is - the transport port is closed for these nodes. When limiting the set of cluster nodes to only those with open transport ports, no failed sniffing cluster state errors occur.
So it seems that there is a requirement for the transport ports to be open, alternatively to set a publish port (which should be open to the client). If this is correct, you might want to add this to the documentation.
Elasticsearch.Net.PipelineException: Failed sniffing cluster state. ---> System.AggregateException: One or more errors occurred. ---> Elasticsearch.Net.PipelineException: An error occurred trying to read the response from the specified node.
at Elasticsearch.Net.RequestPipeline.Sniff() in C:\Users\russ\source\elasticsearch-net-5.x\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 340
Thanks for the awesome work with the NEST language client for .Net.
My cluster is running on https://cloud.elastic.co/ and when I try to connect using the SniffingConnectionPool, I see the following exception:
[PipelineException: An error occurred trying to read the response from the specified node.]
Elasticsearch.Net.RequestPipeline.Sniff() in C:\code\elasticsearch-net\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:342
[AggregateException: One or more errors occurred.]
[PipelineException: Failed sniffing cluster state.]
Elasticsearch.Net.RequestPipeline.Sniff() in C:\code\elasticsearch-net\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:357
Elasticsearch.Net.RequestPipeline.SniffOnConnectionFailure() in C:\code\elasticsearch-net\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:317
Elasticsearch.Net.Transport1.Ping(IRequestPipeline pipeline, Node node) in C:\code\elasticsearch-net\src\Elasticsearch.Net\Transport\Transport.cs:177 Elasticsearch.Net.Transport1.Request(HttpMethod method, String path, PostData`1 data, IRequestParameters requestParameters) in C:\code\elasticsearch-net\src\Elasticsearch.Net\Transport\Transport.cs:69
I'm using an Elastic 5.2 cluster and tested with both Nest client 5.0 and 5.2.
@DejongheE elastic cloud is not expected to work with the SniffingConnectionPool. Elastic Cloud exposes a single proxy url.
When you use the SniffingConnectionPool this is what happens (the responses ApiCall property will list out an AuditTrail.
SniffOnStartup, first time usage of client we reach out
SniffSuccess, sniffing returns the node but these are all private IPs
PingFailure, we try to use the first node on a private ip so we ping which will fail.
SniffOnFail, we resniff the cluster on failures by default so we attempt to sniff again
SniffFailure, sniff on our node fails.
Please use the SingleNodeConnectionPool
@Babadofar the client will never communicate over the transport layer so this is definitely not a requirent. Mind sharing a bit more about your set up and also copy what DebugInformation returns on the response/exception. Preferably on the issue @forloop opened
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.