[erlang-questions] use inetrc to add entries to perceived /etc/hosts

Michael Santos michael.santos@REDACTED
Tue Oct 4 18:36:08 CEST 2011

On Tue, Oct 04, 2011 at 04:31:19PM +0200, Philip Müller wrote:
> On Tue, 04 Oct 2011 15:28:23 +0200, Michael Santos
> <michael.santos@REDACTED> wrote:
> >On Tue, Oct 04, 2011 at 02:14:45PM +0200, Philip Müller wrote:
> >>Hi everybody,
> >>
> >>we are working on a distributed erlang project. We want to have as
> >>little dependencies on specific infrastructure as possible.
> [...]
> >>Running slave:start(host1). on host2 always gave the following error:
> >>>{error,timeout}
> >>But a simple "ssh" works.
> >>
> >>Any ideas what we did wrong?
> >
> >Try enforcing the lookup order. Add this to the "erl_inetrc" file:
> >
> >{lookup, [file, dns]}.
> >
> Thanks for the tip but alas, it does not work. Still getting a timeout.
> Are there ways to diagnose this further? We do not know whether the
> hostname-ip mappings are imported at all.

The timeout is using slave:start/1? Use slave:start/3 to pass cli
options to the slave:

fcs:~$ cat erl_inetrc
{lookup, [file, dns]}.

fcs:~$ erl -rsh ssh -sname test -kernel inetrc '"./erl_inetrc"'
(test@REDACTED)3> slave:start('fcs', 't', "-kernel inetrc '\"./erl_inetrc\"'").

(test@REDACTED)4> rpc:call('t@REDACTED', inet_db, get_rc, []).

More information about the erlang-questions mailing list