[ejabberd] node name already occupied ctl-ejabberd

Sven-Haegar Koch haegar at sdinet.de
Thu Jul 10 17:50:55 MSK 2014


On Thu, 10 Jul 2014, Holger Weiß wrote:

> * Peter Schwindt <ejabberd at schwindt-net.de> [2014-07-05 16:14]:
> > is there anything that can be done against upper mentioned notification
> > that occurs in the logs almost every five minutes?
> 
> This is epmd telling you that you're trying to start an Erlang node with
> the name "ctl-ejabberd" while another one is already running with that
> name.  This is either true, in which case the second one should use
> another name (or wait for the first one to complete).¹ 

I think it is true, there are multiple instances of ejabberdctl that get 
started in parallel by 1. munin-node and 2. icinga nrpe, all querying 
some info from ejabberd.

Is is possible to tell ejabberdctl to use a random node name that will 
never collide with already running instances? Why is it even using a 
hardcoded name? Restricting it to globally one sounds very stupid to me.

> Or the first one
> didn't close the TCP connection to epmd properly (due to a crash or so),
> in which case "epmd -stop ctl-ejabberd" could be used to unregister that
> name.

We also have a bunch of crashing ejabberdctl processes, like 4-8 
erl_crash_*.dump files created in /var/log/ejabberd per hour.

I assumed this happens because of the duplicate node errors, and our 
monitoring scripts not being migrated from ejabberd 2.1 to 14.05 
completely yet, 

=erl_crash_dump:0.3
Thu Jul 10 15:00:11 2014
Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{k
System version: Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]

> Holger
> 
> ¹ From a quick look at the ctl() function in ejabberdctl, it might help
>   to install /usr/bin/flock or /usr/bin/jot.

Both are installed, does not seem to matter.

haegar at waehring:~$ ls -l /usr/bin/flock
-rwxr-xr-x 1 root root 14552 Dec 11  2012 /usr/bin/flock
haegar at waehring:~$ ls -l /usr/bin/jot
lrwxrwxrwx 1 root root 10 Jan 31  2007 /usr/bin/jot -> athena-jot

c'ya
sven-haegar

-- 
Three may keep a secret, if two of them are dead.
- Ben F.


More information about the ejabberd mailing list