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

UENISHI Kota <>
Sun Apr 11 11:12:27 CEST 2010


Thanks, Anthony.
I'll check it out (It seems same idea and has better implementation than me!).
Of course an implementation of Bonjour, or other standard rendez-vouz protocol
would be much better.

On Sun, Apr 11, 2010 at 4:51 AM, Anthony Molinaro
<> wrote:
> 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( [ '', 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:
>>
>
> --
> ------------------------------------------------------------------------
> Anthony Molinaro                           <>
>



-- 
UENISHI Kota from PC :D


More information about the erlang-questions mailing list