Elasticsearch.net 5.0 Beta1, SniffingConnectionPool - Failed sniffing cluster state

(Murfee25) #1

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"));


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:


Previous versions (1.7 and 2.4) return this property.

any help/advise greatly appreciated.


(Greg Marzouka) #2

Hi murfee25, thanks for reporting this, it's definitely a bug in the client due to changes in the nodes API response. I've opened https://github.com/elastic/elasticsearch-net/issues/2339 to track this, and we're working on a fix for the next release.

(system) #3