Open mogadanez opened 8 years ago
Thanks for reporting this.
What is err
in this case?
some network error: for example
Error: getaddrinfo ENOTFOUND asdfs asdfs:8087
at errnoException (dns.js:26:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
easy to reproduce by providing asdfs:8087 as one of the cluster node on client construction
I have a cluster with several nodes node1.... node5 When one of the node becomes down in runtime - all works fine, client retry another host when fail. But on start it call callback with error. So, by having err in callback i cannot say my cluster operational or not, i need do something like
new Riak.Client(...., function (err, client) { if (err && ( !client.cluster || !client.cluster.state ) ) { throw err ; } // can work
normally
});not sure this is bad, but need note it in doc probably. In our environment we use docker widely, and start/stop happens very often and I was catch this issue during daily backup when one one goes to down.