<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi all,<br><br>I installed RabbotMQ & tried to start it.<br><br>But I always got error as following:<br><br>{error_logger,{{2012,7,6},{13,32,21}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,epmd_close}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]}<br>{error_logger,{{2012,7,6},{13,32,21}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancest
ors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[#Port<0.90>,<0.17.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,24},{reductions,551}],[]]}<br>{error_logger,{{2012,7,6},{13,32,21}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[rabbitmqprelaunch1077,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}<br>{error_logger,{{2012,7,6},{13,32,21}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}<br>{error_logger,{{2012,7,6},{13,32,21}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}<br>{"Kern
el pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}<br><br>Crash dump was written to: erl_crash.dump<br>Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})<br><br><br>I ran it on a server with public IP 183.*.*.* .<br><br>In Erlang src, I found that epmd checks connection src. <br><br> /* Determine if connection is from localhost */<br> if (getpeername(s->fd,(struct sockaddr*) &si,&st) ||<br> st < sizeof(si)) {<br> /* Failure to get peername is regarded as non local host */<br> s->local_peer = EPMD_FALSE;<br> } else {<br> /*
Only 127.x.x.x and connections from the host's IP address<br> allowed, no false positives */<br> s->local_peer =<br> <font style="" color="#FF0000">(((((unsigned) ntohl(si.sin_addr.s_addr)) & 0xFF000000U) ==</font><font style="" color="#FF0000"><br></font><font style="" color="#FF0000"> 0x7F000000U) ||</font><br> <font style="" color="#FF0000"> (getsockname(s->fd,(struct sockaddr*) &di,&st) ?</font><font style="" color="#FF0000"><br></font><font style="" color="#FF0000"> EPMD_FALSE : si.sin_addr.s_addr == di.s
in_addr.s_addr));</font><br> }<br> dbg_tty_printf(g,2,(s->local_peer) ? "Local peer connected" :<br> "Non-local peer connected");<br><br><font style="" color="#000000"><br></font><font style="" color="#000000">But unfortunately, </font><font style="" color="#000000">si.sin_addr.s_addr was 183.*.*.*</font><font style="" color="#000000">, while </font><font style="" color="#000000">di.sin_addr.s_addr was 127.0.0.1</font><br><br>My log£ºChecking peer address, getsockname ret: 0, si_addr=0xb7??????, di_addr=0x7f000001<br><br>Is there any way to force RabbitMQ server connect epmd via a specified address£¿<br><br>Thanks a lot.<br><br>He Bin<br><br>                                            </div></body>
</html>