1

Could not solve this by myself

  1. launched a new node A with ssh command
  2. started a new node B
  3. gen_tcp:connect/3 works on B, but rpc:call(B,gen_tcp,connect,Params) not works.

Both nodes are running on local laptop

and one node returns ok and the other node returns error.

I don't understand.

Anyone knows why?

~ $ssh allen@127.0.0.1  'erl -name loadtest@127.0.0.1 -detached -setcookie loadtest'
~ $erl -name allen@127.0.0.1 -setcookie loadtest
Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.8.4  (abort with ^G)
(allen@127.0.0.1)1> gen_tcp:connect("www.google.com",80,[]).                                
{ok,#Port<0.630>}
(allen@127.0.0.1)2> rpc:call('loadtest@127.0.0.1',gen_tcp,connect,["www.google.com",80,[]]).
{error,nxdomain}
allenhwkim
  • 27,270
  • 18
  • 89
  • 122
  • 1
    I think you are not connected to `'loadtest@127.0.0.1'`. What `nodes()` tells you? – Hynek -Pichi- Vychodil Sep 21 '11 at 19:28
  • 2
    They said, it's a Mac issue. http://www.trapexit.org/forum/viewtopic.php?p=64314&sid=f99d7824e522a779472b8c2710b3e6f5 – allenhwkim Sep 26 '11 at 15:37
  • The same thread [on Gmane](http://comments.gmane.org/gmane.comp.lang.erlang.general/55921) and [on erlang.org](http://erlang.org/pipermail/erlang-questions/2011-September/061246.html), in case Trapexit is unavailable. – legoscia Feb 11 '13 at 11:04

0 Answers0