[erlang-questions] Problem with socket-based distribution example in the "Programming Erlang" book
Mike Berrow
mberrow1@REDACTED
Sun Aug 5 22:22:34 CEST 2007
Hi,
I am trying to following along with Joe's tutorial on socket-based distribution from "Programming
Erlang" book.
On page 190 we are asked to start the name server (and the module kvs).
So in the first session, I set up my environment, then do as asked.
Eshell V5.5.4 (abort with ^G)
1> os:putenv("HOME","C:\\Documents and Settings\\mberrow").
true
2> code:add_patha("./socket_dist").
true
3> kvs:start().
true
4> lib_chan:start_server().
lib_chan starting:"C:\\Documents and Settings\\mberrow/.erlang_config/lib_chan.conf"
ConfigData=[{port,1234},
{service,nameServer,
password,
"ABXy45",
mfa,
mod_name_server,
start_me_up,
notUsed}]
true
That looks happy. And it has found the config file (placed as directed).
So (as directed) I start up the second session (1st adding "./socket_dist" to my code path)
as follows:
Eshell V5.5.4 (abort with ^G)
1> code:add_patha("./socket_dist").
true
2> {ok, Pid} = lib_chan:connect("localhost", 1234, nameServer, "ABXy45", "").
{ok,<0.34.0>}
That looked OK, but immediately in the 1st session, I get
5> server error:{undef,[{mod_name_server,start_me_up,[<0.40.0>,[],notUsed]},
{lib_chan,really_start,3}]}
And there I am stuck.
but mod_name_server.beam is sitting right there in ./socket_dist dir with all the others.
Why am I getting 'undef' ?
-- Mike Berrow
More information about the erlang-questions
mailing list