[erlang-questions] global:registered_names() returns []
Paul Fisher
pfisher@REDACTED
Wed Oct 22 19:00:59 CEST 2008
adrian.balij@REDACTED wrote:
> 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!
Do you have a $HOME/.hosts.erlang file with the following:
'localhost'.
(end file with empty line)
--
paul
More information about the erlang-questions
mailing list