net_adm:ping

在同一台机器中启动2个节点a和b,在a节点中使用net_adm:ping('b@GT').会报错:

[liang.hm@GT ~]$ erl -sname a

Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.1 (abort with ^G)
(a@GT)1> net_adm:ping('b@GT').
pang

(a@GT)2>

 

[root@GT liang.hm]# erl -sname b
Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.1 (abort with ^G)
(b@GT)1>
=ERROR REPORT==== 29-Nov-2013::12:02:31 ===
** Connection attempt from disallowed node a@GT **

 

这是权限问题。2个节点分别使用了2个不同的用户(liang.hm和root)启动,改为相同用户就可以了:)

posted @ 2013-11-29 12:17  hongmao  阅读(465)  评论(0编辑  收藏  举报