Errors when trying to set up clustering

Hi there,

I'm pretty new to ejabberd, but I'm trying to set up ejabberd clustering. So far its not going very well.
I'm following this tutorial: https://raymii.org/s/tutorials/Set_up_a_federated_XMPP_Chat_Network_with... - but I've tried some other things as well.

This is the error I'm getting now:

[ec2-user@ip-xxx-xx-xx-xxx bin]$ ./ejabberdctl
{error_logger,{{2015,7,27},{8,2,2}},"Protocol: ~tp: register/listen error: ~tp~n",["inet_tcp",eaddrnotavail]}
{error_logger,{{2015,7,27},{8,2,2}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.21.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,322}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.18.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,496}],[]]}
{error_logger,{{2015,7,27},{8,2,2}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['ctl-ejabberd@node1.chatdomain.com',longnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2015,7,27},{8,2,2}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2015,7,27},{8,2,2}},crash_report,[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.9.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,133}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}},{ancestors,[<0.8.0>]},{messages,[{'EXIT',<0.10.0>,normal}]},{links,[<0.8.0>,<0.7.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,27},{reductions,117}],[]]}
{error_logger,{{2015,7,27},{8,2,2}},std_info,[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
{"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}}}}},{kernel,start,[normal,[]]}}}"}

Crash dump was written to: /home/ec2-user/ejabberd-15.06/logs/erl_crash_20150727-080202.dump
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
[ec2-user@ip-xxx-xx-xx-xxx bin]$

So this is what I've done:

- Create a new AWS ec2 instance with Amazon Linux
- Install ejabberd 15.06
- In the config file @ /home/ec2-user/ejabberd-15.06/conf/ejabberdctl.cfg enabled the following things:
- FIREWALL_WINDOW=4200-4210
- INET_DIST_INTERFACE={xx,xx,xx,xx} (xxxxx = external IP)
- ERLANG_NODE=ejabberd@Node1.chatdomain.com

Then when I just do this:
[ec2-user@ip-xxx-xx-xx-xxx bin]$ ./ejabberdctl start

I get the error as shown above.

When I disable the INET_DIST_INTERFACE line, is does start without errors...

In my amazon firewall I've opened 4200-4210, 4369, 5280 - which seems to work, because with the INET_DIST_INTERFACE line disabled I can access the http://node1.chatdomain.com:5280/admin/nodes/ address.

For context: The end goal is to set up a ejabberd server architecture that can handle server failovers. So for now I assume I'd need a Master-Master relation between two ec2 instances in case one fails.

I'm fairly new to linux and ejabberd, so I don't know how to debug of diagnose what's the problem. If anyone knows what might be wrong, any tips are appreciated.

Syndicate content