I am getting this error while implementing Elastic API in my project. No nodes were attempted, this can happen when a node predicate does not match any nodes. Has Anyone had any knowledge regarding this error?
-
2This can happen if you define a predicate that will not match any nodes that the client knows about, when determining a node to run a request against. Take a look at the documentation at: elastic.co/guide/en/elasticsearch/client/net-api/current/…Russ Cam– Russ Cam2017-07-20 22:52:37 +00:00Commented Jul 20, 2017 at 22:52
-
1@RussCam I provided my answer below w/ the caveat that I cannot explain why I would see that condition sporadically in a single node or single load balancer scenario. Any thoughts why this exception would occur sporadically in that scenario?Thomas Doman– Thomas Doman2017-12-01 05:30:43 +00:00Commented Dec 1, 2017 at 5:30
Add a comment
|
1 Answer
One scenario I can add here is where your cluster contains only a single node or you are interacting with your cluster through a single load balancer instance. I discovered that a SniffingConnectionPool may sporadically throw this exception (ie. No nodes were attempted). I cannot explain why this only happens sporadically but I solved it by using a SingleNodeConnectionPool as Martijn Laarman explains here. The scenario in that link is another similar case to mine (ie. Elastic Cloud).
1 Comment
Chris Parker
This is still true in 2021. Switching to SingleNodeConnectionPool for single cloud installations fixed the issue.