[erlang-questions] automatically net-configuring node with net_kernel:start/1

Anthony Molinaro anthonym@REDACTED
Sat Apr 10 21:51:42 CEST 2010


You might check out nodefinder

http://code.google.com/p/nodefinder/

It provides various mechanisms for self configuration including multicast,
ec2 tools or s3.

These all end up using net_adm:ping to join the group, so probably would
not exhibit the problems you are seeing.

We used this quite extensively in ec2, to dynamically grow and shrink
our erlang cluster.

-Anthony

On Thu, Apr 08, 2010 at 04:32:21PM -0800, UENISHI Kota wrote:
> I'm writing a self-configuring node cluster with net_kernel:start/1.
> It starts without -name nor -sname option and gets its IP adress from
> inet:getif/0.
> And they configure themselves with net_kernel:start/1 as follows:
> 
> net_kernel:start( [ 'appname@REDACTED', longnames ] ).
> 
> Servers find each other by sending its longname by UDP broadcasting,
> and they connects each other.
> 
> The problem is, starting erl without -name option it doesn't kick epmd
> and following net_kernel:start/1 fails in tcp_inet_dist:listen (maybe
> because of epmd not running).
> And another way - starting with -name option with bad ip address ( or
> local ip) makes net_kernel:start/1 result in {error, not_allowed}.
> 
> Is it a wrong to think that if epmd would start when
> net_kernel:start/1 had been called, isn't it?
> 
> -- 
> UENISHI Kota from PC :D
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> 

-- 
------------------------------------------------------------------------
Anthony Molinaro                           <anthonym@REDACTED>


More information about the erlang-questions mailing list