Erl无法连接到本地EPMD。为什么? [英] Erl cannot connect to local EPMD. Why?

查看:97
本文介绍了Erl无法连接到本地EPMD。为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

erl
Erlang R14B04(erts-5.8.5)[源代码] [64位] [rq:1] [异步线程:0] [内核轮询:false]
Eshell V5 .8.5(使用^ G终止)

erl Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:0] [kernel-poll:false] Eshell V5.8.5 (abort with ^G)

[root@ip-10-101-61-85 ec2-user]# erl -sname foo
{error_logger,{{2012,12,7},{3,17,8}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,epmd_close}},[{inet_tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{net_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}]}
{error_logger,{{2012,12,7},{3,17,8}},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},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[#Port<0.55>,<0.17.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,453}],[]]}
{error_logger,{{2012,12,7},{3,17,8}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[foo,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2012,12,7},{3,17,8}},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}]}]}
{error_logger,{{2012,12,7},{3,17,8}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

我很好在我的本地计算机上,但不在ec2上,我想知道这是否是与网络相关的问题。
如何检查? EPMD日志会一直说我的连接来自非本地地址和阻止。

I am working fine on my localmachine but not on ec2, i wonder if it is some network related problem. How can I check it? the EPMD log keep say my connection is from non-local address and block.

这会影响我的Rabbitmq启动。

This would affect my rabbitmq start.

help !!〜

推荐答案

这不是错误。较新的erlang版本默认限制将epmd连接到本地地址。您最有可能遇到了路由问题,或者原因是使用iptables伪装了所有传出流量,而没有检查目标是否为127.0.0.0/8。

This is not a bug. Newer erlang versions restrict connections to epmd to local addresses by default. Most likely you have had routing issues or the reason is to masquerade all outgoing traffic with iptables without checking if the destination is 127.0.0.0/8.

调整您的MASQUERADE规则:

Adjust your MASQUERADE rule:

iptables -t nat -A POSTROUTING ! -d 127.0.0.0/8 -j MASQUERADE

和/或检查您的路由表。

And/Or check your routing table.

这篇关于Erl无法连接到本地EPMD。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆