[erlang-questions] Distributed Erlang ... alternate port?
Mon Mar 17 02:49:17 CET 2008
>> Is there a way to run distributed erlang through an alternate port ?
>> I know erlang needs both TCP and UDP on port 4369 normally.
>> Is there any way to configure it to use other ports?
> Yes, but there are two different TCP ports you should be aware of.
> First is epmd, which is what listens on 4369. This number is hard
> coded into the Erlang binaries. It looks like you can change the
> definition of EPMD_PORT_NO in erts/epmd/epmd.mk, but I've never played
> with this.
> Second is erlang's distribution code, which uses the kernel
> application's inet_dist_listen_min and inet_dist_listen_max to decide
> what TCP port to listen on. After creating a listening socket, it
> registers this port with epmd.
Hmmm. So, at the remote node, epmd will be listening on 4369. I was hoping
that I could get erlang on the local machine to believe it could connect
to an apparently "local" erlang epmd on a different port (the local ends of the tunnels I make).
But if that is hard coded on both ends, I guess I am out of luck without going to
some very custom build. That would be a pity.
The "inet_dist_listen_min and inet_dist_listen_max" also indicates that there are even other
ports coming into play that I would need to re-map.
A use case example I can offer is monitoring and control of many, geographically dispersed
remote weather stations. The access restriction is that I can only get in (practically) through
the ssh port (22). There is no opening of extra ports through firewalls.
That's the motivation for the tunneling approach.
-- Mike Berrow
More information about the erlang-questions