question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SniffingConnectionPool - Failed sniffing cluster state

See original GitHub issue

NEST/Elasticsearch.Net version: 5.0.0-beta1

Elasticsearch version: 5.0.0-rc1

From https://discuss.elastic.co/t/elasticsearch-net-5-0-beta1-sniffingconnectionpool-failed-sniffing-cluster-state/63874:

Not sure if this is the correct forum, but I had this working last week but for the life of me I can’t get it to work this week.

Question: Is the SniffingConnectionPool currently supported by the Elasticsearch.net/NEST APIs ?

2 nodes running ES 5.0.0-rc1, on my windows machine, another node on another developers windows machine.

Running these statements from Linqpad:

var nodes = new List<string>(){"http://danny-desktop:9200", "http://danny-desktop:9201", "http://vinay-desktop:9200"};

var uris = nodes.Select(n=> new Uri(n));
var connectionPool = new SniffingConnectionPool(uris);
//var connectionPool = new StickyConnectionPool(uris);

var connectionSettings = new ConnectionSettings(connectionPool);

var client = new ElasticClient(connectionSettings);

var result = client.IndexExists(Indices.Parse("hd20160518"));

result.Dump();

It fails with message “Failed sniffing cluster state.” Inner exception stack trace places it at:

at Elasticsearch.Net.Node..ctor(Uri uri)
at Elasticsearch.Net.SniffResponse.<ToNodes>d__11.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at Elasticsearch.Net.SniffingConnectionPool.Reseed(IEnumerable`1 nodes)
at Elasticsearch.Net.RequestPipeline.Sniff()

It looks to me like the code is expecting to find a property “http_address” on the result of the request for: _nodes/_all/settings?flat_settings&timeout=2s

Previous versions (1.7 and 2.4) return this property.

any help/advise greatly appreciated.

regards, Danny

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JessicaQincommented, Jan 27, 2017

@russcam Got NEST 5.0.1 and all worked after fixing some breaking changes in code. Thanks!

0reactions
russcamcommented, Jan 25, 2017

(updated comment)

@JessicaQin Yes, NEST 5.x is compatible with Elasticsearch 5.1.2; NEST 2.x is not compatible; it may work for the most part but there are breaking changes in Elasticsearch will that cause NEST 2.x to throw an exception, as in this case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to perform search in Elasticsearch, error “Failed ...
I have been facing a strange problem with Elasticsearch where only Search API fails with message "Failed sniffing cluster state.".
Read more >
Sniffing on connection failure | Elasticsearch .NET Clients ...
When the call fails on 9201, the following sniff succeeds and returns a new cluster state of healthy nodes. This cluster only has...
Read more >
Elasticsearch.Net SniffingConnectionPool requires open ...
When limiting the set of cluster nodes to only those with open transport ports, no failed sniffing cluster state errors occur.
Read more >
Error while sniffing nodes - how to solve related issues
Briefly, this error occurs when there is an issue with sniffing nodes in Elasticsearch, which can cause issues with communication between nodes. To...
Read more >
The journey of scaling up a production Elasticsearch cluster
The sniffingConnectionPool negatively impacts performance despite sniffing is relatively lightweight operation. Lack of ready-to-use solution ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found