Hi,<br><br>Dan is right, the issue is your code not being available on the remote node, and the reason is the following. In this code:<br><br><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">(another@mydesk)1> Fun = fun() -> mnesia:read(mytable, akey) end.
<br>#Fun<erl_eval.20.82930912>
<br></blockquote><div><br>the code referred by `Fun' is in the module `erl_eval' (as you can see from #Fun<erl_eval....>). It is a symbolic evaluator which evaluates the code you typed in the shell; the code itself is bound to variables in `Fun' (stored in a kind of closure, which is sent over to the remote node during the rpc call). This works because `erl_eval' is also loaded on the remote node.<br><br>However, in this code:<br><br></div><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">-module(anrpctest).
<br>
<br>do() ->
<br>    F = fun() -> mnesia:read(mytable, akey) end,
<br></blockquote><div><br>the code of `F' is compiled into the module `anrpctest', you can also see this from the error message:<br><br></div><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">{aborted, {undef, [{#Fun<anrpctest.0.126678793>,<wbr>[],[]},<br></blockquote><br>This will work only if you load the module `anrpctest' on the remote node too. (If you are just experimenting, use the l() command in a shell after each recompilation.)<br><br><br>L.<br>