M
M
Maxim Barulin2015-12-28 15:27:14
Erlang
Maxim Barulin, 2015-12-28 15:27:14

How to call gen_server on a remote node?

Good day!
There are two nodes: the client is running on one, the server is running on the second. The client and server are based on otp. It is necessary to call the server module from the client. When called
rpc:server_call('server', module, res, [params]).
, it results in {error,nodedown}, although the module is started with a global name and the node is attached, calling nodes() shows it in the list. What did I miss?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Barulin, 2015-12-29
@Slavenin999

hmm ... everything turned out to be nowhere easier ...
gen_server:call({global, module}, [params]).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question