[erlang-questions] Making rpc calls from escript

Vik Olliver vik@REDACTED
Mon Sep 1 06:32:43 CEST 2008


Having great fun here. There is an Erlang function I wish to call on the
local machine. If I remsh into the current process and look at the
prompt, I see it is called: erms@REDACTED

That's the IP address of the local machine, so I know I've got the right
one - and my magic cookie seems to be correct or I wouldn't get this
far.

So, I put in my escript:

#!/usr/bin/env escript
main([Blah]) ->
io:format("RPC does ~p~n",[
  rpc:call('erms@REDACTED', erms_reports,
    repopulate, [Blah] )]) .

(Some parameters and names omitted to protect the guilty, but trust me:
erms_reports:repopulate is there alright)

Basically, I see:
RPC does {badrpc,nodedown}

Now the node is not down, 'cos I can remsh into the bally thing with:
erl -name con2@REDACTED -remsh erms@REDACTED

So why, in its infinite wisdom, does escript not connect? Does it
require white mice, mystic runes and a moonlit night, or what?

Vik :v)




More information about the erlang-questions mailing list