[ejabberd] strange registration error

Konstantin Khomoutov flatworm at users.sourceforge.net
Fri Sep 18 21:57:53 MSD 2009


Jan Koum wrote:

>>   17/Sep/2009:15:27:36 HARDFAIL command:
>>>>> [/home/jkoum/ejabberd-2.1.0_beta1/bin/ejabberdctl register xxx
>>>>> s.example.netyyy] return: 1
>>>>> {error_logger,{{2009,9,17},{15,27,33}},"Protocol: ~p:
>>>>> register error:
>>>>> ~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{net_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]}
[...]
>> The problem is possibly not related to starting *ejabberd itself*
>> multiple times, but rather to staring two or more instances of ejabberdctl
>> at the same time.
[...]
> lol.. all of sudden i get flashbacks of usenet circa 1996:)  what about
> in-line responses?:)
Mailing lists are not much different from Usenet (which is alive and 
kicking by the way), and after all, this list is indexed by google so 
let's help those who will google for your problem by constructing easily 
readable e-mails. I hope you did not get too tired pressing ctrl-end in 
your editor before answering, right? ;-)

> anyways, yes you are correct -- it is a race condition.  i added random
> sleep/wait for the script to retry if it detects a collision with another
> ejabberdctl.
> 
> if i pass random/unique node name to ejabberdctl for registration, wouldn't
> that break things with mnesia db when i start/stop nodes?
I wouldn't swear that it won't as I have no experience with clustered 
ejabberd setup, but I see no reason for complications to happen: 
ejabberdctl's nodes are not supposed to be contacted by other nodes -- 
they are "client only" nodes.



More information about the ejabberd mailing list