[erlang-questions] gproc dynamic clustering

Park, Sungjin <>
Sat Jan 18 15:25:59 CET 2014


Hi all,
I surveyed the problem briefly and found an answer
http://erlang.2086793.n4.nabble.com/Gproc-in-a-dynamic-cluster-td3705356.htmlhere
and tested like.

-- from node 1 --
()1> application:start(gproc).
()2> gproc:reg({p,g,shell}).

-- from node 2 --
()1> net_adm:ping().
()2> application:start(gproc).
()3> gproc:reg({p,g,shell}).
** exception exit: {timeout,{gen_leader,leader_call,
                                        [gproc_dist,

 {reg,{p,g,shell},undefined,<0.49.0>}]}}
     in function  gen_leader:leader_call/2 (src/gen_leader.erl, line 359)
     in call from gproc_dist:leader_call/1 (src/gproc_dist.erl, line 708)
     in call from gproc:reg/1 (src/gproc.erl, line 605)

As you can find here, I couldn't register to the resource created before
clustering.  After several trial, I found out that I had to restart gproc
application from node1.  It means that when I join 10th node to a cluster
this way, I have to restart the gproc applications in all 9 nodes and
register all the resources again.

Have I done something wrong?  Or is there any way to avoid this?

-- 
Park, Sungjin
-------------------------------------------------------------------------------------------------------------------
Peculiar travel suggestions are dancing lessons from god.
  -- The Books of Bokonon
-------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140118/cbbfcdd9/attachment.html>


More information about the erlang-questions mailing list