[ejabberd] strange registration error

Peter Viskup skupko.sk at gmail.com
Thu Nov 12 13:14:33 MSK 2009


You are right, I am running Debian version of ejabberd and I have been never
seen such error message.
The Debian way for suffix:
$(date +%s%N)

Anyway I am using ejabberdctl script for munin-based statistics and after
71-day uptime of ejabberd I have got 601648 ejabberdctl records.

jabber:/var/log/ejabberd# echo "ejabberdctl1257569451228580106 at localhost" |
wc -c
41
jabber:/var/log/ejabberd# zgrep -c ejabberdctl erl_crash.dump.gz
601648

If I calculated that correctly it is cca 23MB:
jabber:/var/log/ejabberd# echo $((41*601648/1024))
24089

The way how to deal with it in my case could be one additional case switch
in ejabberdctl (and it is working):

jabber:/var/log/ejabberd# ejabberdctl munin stats uptime-seconds
156815
jabber:/var/log/ejabberd# diff -u /usr/sbin/ejabberdctl
/usr/sbin/ejabberdctl.original
--- /usr/sbin/ejabberdctl 2009-11-12 11:12:34.000000000 +0100
+++ /usr/sbin/ejabberdctl.original 2009-08-19 12:02:29.000000000 +0200
@@ -44,15 +44,6 @@
-remsh $ERLANG_NODE \
"$@"
;;
- munin)
- shift
-
- exec $ERL $SNAME ejabberdctlmunin \
- -pa $EBIN_DIR \
- -s ejabberd_ctl \
- -noinput \
- -extra $ERLANG_NODE "$@"
- ;;
*)
exec $ERL $SNAME ejabberdctl$SUFFIX \
-pa $EBIN_DIR \


On Mon, Sep 21, 2009 at 11:47 AM, Konstantin Khomoutov <
flatworm at users.sourceforge.net> wrote:

> Badlop wrote:
> [...]
>
>  A solution is to use a pseudo-random value: restricted to a small
>> amount of values that repeat periodically.
>> Quick example in Bash:
>>  MINUTE=`date +%M`
>>  SECOND=`date +%S`
>>  PNUM=$[ $MINUTE + $SECOND ]
>>  erl -sname ctl-$PNUM-ejabberd at localhost ...
>>
>> I suspect this solution is not yet good enough for inclusion in main
>> ejabberd, so suggestions are welcomed.
>>
> Just copy the solution from Debian -- it uses nanoseconds to greatly lower
> the chances of a race condition.
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091112/4264e1e5/attachment.html>


More information about the ejabberd mailing list