[erlang-questions] How: jinterface nodes cannot connect to epmd in Mac OS X
Sun Jan 6 14:10:07 CET 2008
Hi to all,
I am currently creating a program made of several Erlang nodes and
jinterface nodes, all running
on the same machine. I am having some serious issues making them
connect to each other,
and I was hoping some one could help me. I am using short names, and
running Erlang 11b-5-1 on Mac OS X 10.4.11 (client version).
In a nutshell, my Erlang and jinterface nodes are able to communicate
only when I am not connected to the internet.
If I connect to the internet and start the nodes again, they are not
able to talk anymore. The Erlang nodes still run and
can connect to epmd, but cannot send or receive messages from each
other. As for the jinterface nodes, they all
crash with a java.IO.Exception, complaining that the nameserver is
not responding (e.g, "Nameserver not responding on Mortimer when
After some googling, I've found out that Mac OS X changes the host
name and domain dynamically according to
current "connection" in the machine ("connection" in Mac OS being
just a bunch of settings that defines how to connect
to the internet - for instance, the DHCP server, username, password
and so on). So if I am not connected to the internet,
my host name will be Mortimer.local, and all works; but if I connect,
my domain name becomes whatever my ISP's DHCP server sends to
my machine (for instance Mortimer@REDACTED), and that seems to
interfere with Erlang name resolution.
I was able to force Mac OS not to change my host name anymore, by
editing an entry in /etc/hostconfig. This fixed my Erlang nodes,
and now they can talk even if I am connected to the internet.
Unfortunately, this didn't fix the jinterface nodes, and they
still crash with the same exception whenever I am connected. Does
anyone has any idea of how I could fix this?
As a reference, this is the Java code I am using to connect:
OtpNode node = new OtpNode("time");
OtpMbox mbox = node.createMbox("server");
More information about the erlang-questions