I know you don't have time to fix reported issues but I'm working on this one for a week now. Even though I don't have a solution yet, I do have some workaround that may be useful to others.
As soon as I put an ejabberd node as a slave using easy_cluster:join() function, the node works until next reboot. syslog reports the following error:
epmd: epmd: node name already occupied ejabberd
and service ejabberd live reports:
"Protocol: ~p: register error: pn",["inet_tcp",
{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},
Note I installed ejabberd from Ubuntu 12.04 packages.
First workaround:
service ejabberd stop
killall -u ejabberd
rm -f /var/run/ejabberd/ejabberd.pid
service ejabberd start
Second workaround:
Add the two following lines at the beginning of the start function in /etc/init.d/ejabberd script:
# Kill epmd if node is already registered
epmd -names | grep -q "$NAME" && pkill epmd
Then, simply run:
service ejabberd start
My current problem is that even after patching /etc/init.d/ejabberd, the slave node fails to properly start after a reboot. I thought it was simply calling this script... I even changed the runlevel of this script to start it after networking is ready, but the problem persists.