Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createNode() fails in child processes when running as cluster #6

Open
irixi opened this issue Jul 12, 2014 · 0 comments
Open

createNode() fails in child processes when running as cluster #6

irixi opened this issue Jul 12, 2014 · 0 comments

Comments

@irixi
Copy link

irixi commented Jul 12, 2014

Hey,

Given that you have a cluster of node processes, the first one will succeed in createNode() but the rest of the child processes will report Error: addMembership EADDRINUSE. I'm on node 0.10.29 and Mac OS X 10.8.5. socket.addMembership() being called multiple times for the same addr:port seems to be the issue?

Unless it's possible to check the state of the multicast for the given addr:port my suggestion would be to wrap the addMembership in try clause (election.js, line 56) and catch any errors. In this particular case everything is working normally - afaik - because the addMembership succeeded for the parent process. I'm sure there's a better way :)

Cheers,

K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant