Could not solve this by myself
- launched a new node A with ssh command
- started a new node B
- 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}