[erlang-questions] Beginner: "sh: line 0: exec: inet_gethost: not found"

Mike Nolta mike@REDACTED
Fri Aug 8 01:10:52 CEST 2008


I have what appears to be a trivial problem, but I'm not sure how to fix it.

First off, I'm running ubuntu 7.10, and my erlang installation is
completely vanilla R12B (download, ./configure, make install). Seems
to work fine, aside from the following problem.

I'm trying to setup an erlang node which starts on boot. So I followed
the instructions in:


I took the "S75otp.system" file described therein, dropped it in
/etc/init.d/, and pointed it at the "/usr/local/lib/erlang/bin/start"
file. I made some minor modifications, like changing /usr/bin/ps ->
/bin/ps in the init.d file, and changed the log directory.

And everything works great. It starts on boot, and I can connect to it
from other erlang nodes, even from other machines.

But if I look in the erlang.log.N files, it's constantly printing:

  sh: line 0: exec: inet_gethost: not found

over and over again, thousands of times a minute. It's causing a
performance hit to my system; some of my other jobs now take twice as
long to run.

As I understand it, inet_gethost is a port program called by beam. The
binary does exist on my system,
in/usr/local/lib/erlang/erts-5.6.3/bin/. I don't know if this is
relevant, but if I start up an erl session and call
inet_gethost_native:gethostbyname(), it works fine.

This should be easy to fix, it just looks like a path issue. But I
tried putting the erts-5.6.3/bin/ directory in PATH and that didn't
fix it. Any advice would be greatly appreciated.



More information about the erlang-questions mailing list