[erlang-questions] How to call a locally Pid cross node on Distributed Application!
Andreas Hillqvist
andreas.hillqvist@REDACTED
Thu Apr 17 10:44:45 CEST 2008
It sounds like the process of the PID has died.
How do you start your gen_server?
Kind regars
Andreas Hillqvist
2008/4/17, wenew zhang <wenewboy@REDACTED>:
> Yes,it's could create a process and use Pid!{Message} send message,
>
> but i use gen_server behavior so i want to use
> gen_server:call(Pid,{Message}) to send message,
>
> in my situation, create process successfully,but can't use gen_server:call()
>
> 1.why i get the "exception exit: {noproc," message like below?
> 2.when i use appmon:start() ,i neither find the pid on AuthserverNode nor
> SocketServerNode.
>
>
>
> (socketservernode@REDACTED)4>
> Pid=spawn(authservernode@REDACTED,authserver1,start,[]).
> <5805.82.0>
> Authserver start_link
> (socketservernode@REDACTED)5> Pid.
> <5805.82.0>
> (socketservernode@REDACTED)6>
> gen_server:call(Pid,{213,"root","123456"}).
> ** exception exit: {noproc,
>
> {gen_server,call,[<5805.82.0>,{213,"root","123456"}]}}
> in function gen_server:call/2
>
>
>
>
> >
> >
> > > thanks for your reply,
> > > i see a example like you said on Joe 's book,
> > > can i use gen_server as a rpc:call()'s Arg ?How can i do that?
> > > tks
> >
> >
> > Sure you can.
> >
> > rpc:call(Node, yourgenserver, start, [Params]).
> >
> >
> > BTW don't top-post and don't forget to CC to erlang-questions :)
> >
> > --
> > With best regards!
> >
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list