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

Error on Episode 7 when running cluster with Libcluster #1

Open
sdia-zz opened this issue May 25, 2018 · 1 comment
Open

Error on Episode 7 when running cluster with Libcluster #1

sdia-zz opened this issue May 25, 2018 · 1 comment

Comments

@sdia-zz
Copy link

sdia-zz commented May 25, 2018

Hello @aseigo ,

first of all, thank you for the Elixir episodes channel on Youtube. I am a subscriber and I thumb upped many of your videos :-))

So I am running into the error above when trying to start a cluster using Libcluster. Do you have any idea? I am running on Mac OS X High Sierra.

I tried to change port in config/libclluster.iex, I even deleted ~/.erlang.cookie....

Any insight is appreciated!
Thank you a lot!

$~/src/exploring-elixir$ iex --sname node3 -S mix
Erlang/OTP 20 [erts-9.3.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
 
Interactive Elixir (1.6.5) - press Ctrl+C to exit (type h() ENTER for help)
iex(node3@deupc00033)1> ExploringElixir.AutoCluster.start
start/0    
iex(node3@deupc00033)1> ExploringElixir.AutoCluster.start
Starting node monitor process
********** Visible Nodes **********
Not connected to any cluster. We are alone.
{:error,
 {:libcluster,
  {{:shutdown,
    {:failed_to_start_child, Cluster.Strategy.Gossip,
     {{:badmatch, {:error, :eaddrinuse}},
      [
        {Cluster.Strategy.Gossip, :init, 1,
         [file: 'lib/strategy/gossip.ex', line: 56]},
        {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 365]},
        {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 333]},
        {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}
      ]}}}, {Cluster.App, :start, [:normal, []]}}}}
iex(node3@deupc00033)2> [info] Application libcluster exited: Cluster.App.start(:normal, []) returned an error: 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:56: Cluster.Strategy.Gossip.init/1
            (stdlib) gen_server.erl:365: :gen_server.init_it/2
            (stdlib) gen_server.erl:333: :gen_server.init_it/6
            (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
[info] Application poison exited: :stopped
@aseigo
Copy link
Owner

aseigo commented May 30, 2018

Known issue on MacOS X where UDP does not like to share the same port. I have to look into what can be done about that, though I don't have a MacOS system to test on.

I may do another episode on clustering with some of the new features that are available in recent OTP releases, and if / when I do then I will also probably bump the libcluster demo to use something other than UDP gossip.

Thanks for the report!

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

2 participants