[erlang-questions] global:registered_names() returns []
adrian.balij@REDACTED
adrian.balij@REDACTED
Tue Oct 21 22:24:39 CEST 2008
Hello everyone,
I am fairly new to Erlang and I have been trying to setup a gen_server so
that other nodes can communicate with it. However, on the client nodes,
every time I call global:registered_names(), it returns []. The odd thing
is on the server node, calling global:registered_names() returns
[account_monitor].
I am running two consoles on the same computer using the following commands:
erl -sname a@REDACTED -setcookie Test
erl -sname b@REDACTED -setcookie Test
Both consoles can ping each other.
My start function is:
% Initialize routine
start_link() -> gen_server:start_link({global, ?MODULE}, ?MODULE, [], []).
where ?MODULE = account_monitor.
I tried calling net_adm:world() and global:sync() and no luck at all!
The gen_server works fine (and by fine, I mean calling
gen_server:call(...)) when I start it locally (start_link({local, ?MODULE}
....).
Any help or suggestions would be extremely helpful at this point!
Additional info:
- OS: Leopard 10.5
- Erang bin: Sep 3, 2008
Thank you for your time,
Adrian Balij
More information about the erlang-questions
mailing list