node-eventstore-client icon indicating copy to clipboard operation
node-eventstore-client copied to clipboard

When using a cluster and we get disconnected and fail to rediscover the gossip seeds via dns the connection stays in closed mode

Open nicdex opened this issue 5 years ago • 3 comments

2019-06-05T21:58:45.559Z INFO EventStoreConnection 'ES-ae2fff3f-a022-4496-bd91-092a46ee8e3a': Closed. Reason: Failed to resolve TCP end point to which to connect. ERROR: Error: Failed to discover candidate in 10 attempts. at /home/AAA/BBB/node_modules/node-eventstore-client/lib/dist.js:6351:25 at at process._tickCallback (internal/process/next_tick.js:189:7) 2019-06-05T21:58:46.054Z INFO Trying to get gossip from GossipSeed { endPoint: { host: '192.168.1.252', port: 2114 }, hostName: undefined } timed out. 2019-06-05T21:58:46.054Z INFO Trying to get gossip from GossipSeed { endPoint: { host: '192.168.1.251', port: 2114 }, hostName: undefined } timed out. 2019-06-05T21:58:46.055Z INFO Trying to get gossip from GossipSeed { endPoint: { host: '192.168.1.250', port: 2114 }, hostName: undefined } timed out. 2019-06-05T21:58:46.558Z INFO Trying to get gossip from GossipSeed { endPoint: { host: '192.168.1.250', port: 2114 }, hostName: undefined } timed out. 2019-06-05T21:58:46.559Z INFO Trying to get gossip from GossipSeed { endPoint: { host: '192.168.1.251', port: 2114 }, hostName: undefined } timed out. 2019-06-05T21:58:46.559Z INFO Trying to get gossip from GossipSeed { endPoint: { host: '192.168.1.252', port: 2114 }, hostName: undefined } timed out.

nicdex avatar Jun 07 '19 16:06 nicdex

Hello, We are having the same issue, but instead of locating our eventstore nodes via DNS, we are locating them via gossip seeds, but it is not working. I have followed the documentation to connect with the cluster but i am not able to connect to all three nodes in a cluster. However if i am to connect to any of the nodes for testing the connectivity, the connection is only established with the master node. The nodes are up and running and i can see that in the eventstore admin panel under the Cluster Status button. Can you please let me know if this feature is under development or if i am making some mistake.

aliabbasjaffri avatar Feb 24 '20 16:02 aliabbasjaffri

Hello @aliabbasjaffri I'm not sure I understand the description of your problem. When you are connecting to a cluster, either using gossip seeds or dns discosvery, the client is always connecting to best available node, which is the master one. This is by design.

nicdex avatar Mar 15 '20 21:03 nicdex

Hi! Thank you for the clarification, i learned that afterwards that this is a design choice in eventstore.

aliabbasjaffri avatar Apr 20 '20 09:04 aliabbasjaffri