[erlang-questions] detection of hostname

Vlad Dumitrescu vladdu55@REDACTED
Wed Oct 24 11:32:16 CEST 2012


Hi Attila,

On Wed, Oct 24, 2012 at 11:18 AM, Attila Rajmund Nohl
<attila.r.nohl@REDACTED> wrote:
> 2012/10/24 Vlad Dumitrescu <vladdu55@REDACTED>:
>> I am considering writing (and publishing) a script that would detect
>> what kind of Erlang communication is possible on a certain machine.
>> The script could say "Sorry buddy, you can't use long names on this
>> machine at all" or "Please add 'foo' to /etc/hosts to let short names
>> work". Whenever people discover some new edge case on their machines,
>> they can update the script. Maybe it would be useful to distribute
>> with OTP?
>
> I'm not sure how feasible it is. For example, the "Add 'foo' to
> /etc/hosts" advice would not work at all if the operating system
> doesn't use the /ets/hosts file for name resolving, for example on
> Linux the /etc/nsswitch.conf file has a line like this:
>
> hosts: dns
>
> In an ideal world, you should only add a line "Turn to your system
> administrator to properly configure your computer" to the
> documentation. However, if there's no competent system administrator,
> you're screwed even if you try to add a "crash course in system
> administration" to your documentation or try to write a system
> administrator script.

You're right. The script can list a few things that might or might not
work as starting points, so that people aren't completely lost.

"You will likely have problems if you plan to use distributed Erlang
(which includes emacs+distel or erlide). Here is a list of detected
issues and some possible solutions. Since every network is different,
only your administrator can be sure which one will work. If you are
the administrator, try them one at a time until it works".

best regards,
Vlad



More information about the erlang-questions mailing list