[ejabberd] strange registration error

Jan Koum jan.koum at gmail.com
Thu Nov 12 18:17:02 MSK 2009


On Thu, Nov 12, 2009 at 7:03 AM, Brian Cully <bcully at gmail.com> wrote:

> On 12-Nov-2009, at 01:48, Jan Koum wrote:
>
> On Mon, Oct 26, 2009 at 11:21 AM, Jan Koum <jan.koum at gmail.com> wrote:
>
>> on freebsd i am using jot(1) -- seems to work so far:
>>
>> # common control function
>> RANDOM=`jot -r 1 1 100`
>> ctl ()
>> {
>>     COMMAND=$@
>>     $EXEC_CMD "$ERL \
>>       $NAME ctl-${RANDOM}-${ERLANG_NODE} \
>>
>> -- yan
>>
>
>
> LOL, looks like a random number between 1 and 100 is NOT enough for me:
>
> Nov 11 20:51:51 im101 last message repeated 8 times
> Nov 11 20:52:09 im101 last message repeated 5 times
> Nov 11 20:52:10 im101 epmd: epmd: node name already occupied
> ctl-46-ejabberd
> Nov 11 20:52:10 im101 epmd: epmd: epmd running - daemon = 1
> Nov 11 20:52:38 im101 last message repeated 7 times
> Nov 11 20:53:21 im101 last message repeated 12 times
>
>
> This is over-engineered. Just use the pid of the shell process with $$.
> It's guaranteed to be unique at the time of call.
>
> -bjc
>
>
the issue is that you want to be limited in the set of values you can use.
badlop said:

*But a problem appears if you periodically call this script: each time you
call it, ejabberdctl connects to the long-lasting ejabberd node with a
different node name. Those names are stored temporarily in the node, and RAM
consumption increases very slowly. Imagine 1 call every minute * a few weeks
of rrdtool callings --> problem.
*

which is why i am using a random number between 1 and 100.  jot(1) is hardly
over-engineering:)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091112/17289555/attachment.html>


More information about the ejabberd mailing list