<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 &amp; 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,&lt;0.20.0&gt;},{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,&lt;0.9.0&gt;]},{messages,[]},{links,[#Port&lt;0.90&gt;,&lt;0.17.0&gt;]},{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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Determine if connection is from localhost */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (getpeername(s-&gt;fd,(struct sockaddr*) &amp;si,&amp;st) ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; st &lt; sizeof(si)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Failure to get peername is regarded as non local host */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s-&gt;local_peer = EPMD_FALSE;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*
  Only 127.x.x.x and connections from the host's IP address<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allowed, no false positives */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s-&gt;local_peer =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font style="" color="#FF0000">(((((unsigned) ntohl(si.sin_addr.s_addr)) &amp; 0xFF000000U) ==</font><font style="" color="#FF0000"><br></font><font style="" color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7F000000U) ||</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="" color="#FF0000"> (getsockname(s-&gt;fd,(struct sockaddr*) &amp;di,&amp;st) ?</font><font style="" color="#FF0000"><br></font><font style="" color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EPMD_FALSE : si.sin_addr.s_addr == di.s
 in_addr.s_addr));</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dbg_tty_printf(g,2,(s-&gt;local_peer) ? "Local peer connected" :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "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>