Cluster.Strategy.Gossip in Windows
lucsel opened this issue · 2 comments
I am trying to implement Cluster.Strategy.Gossip in Windows x64 environment for a classroom project, but I always get this error when launching the second node. Is there any known solution to implement this strategy in Windows?
[info] Application chat exited: Chat.start(:normal, []) returned an error: shutdown: failed to start child: Cluster.Supervisor ** (EXIT) shutdown: failed to start child: Cluster.Strategy.Gossip ** (EXIT) an exception was raised: ** (MatchError) no match of right hand side value: {:error, :eaddrinuse} (libcluster) lib/strategy/gossip.ex:89: Cluster.Strategy.Gossip.init/1 (stdlib) gen_server.erl:374: :gen_server.init_it/2 (stdlib) gen_server.erl:342: :gen_server.init_it/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 ** (Mix) Could not start application chat: Chat.start(:normal, []) returned an error: shutdown: failed to start child: Cluster.Supervisor ** (EXIT) shutdown: failed to start child: Cluster.Strategy.Gossip ** (EXIT) an exception was raised: ** (MatchError) no match of right hand side value: {:error, :eaddrinuse} (libcluster) lib/strategy/gossip.ex:89: Cluster.Strategy.Gossip.init/1 (stdlib) gen_server.erl:374: :gen_server.init_it/2 (stdlib) gen_server.erl:342: :gen_server.init_it/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Do you know if Windows supports the reuseaddr
option? If not, then you need to set if_addr
uniquely for each node if running on the same host, so that they each bind to their own interface.
Going to close this since it has been dead since my last reply; feel free to reopen if you get around to it (or if you are someone else other than the OP that is dealing with this issue as well).