[erlang-bugs] net_adm:ping annoying messages due to /etc/hosts content

Mon Jun 4 22:23:56 CEST 2012


I finally found the problem.

A colleague of mine had the "good" idea to add 'localhost'. in
~/.hosts.erlang both in test env and in customer env,  mixed with FQDN
hosts ...

The line which cause the messages was (simplified) :
lists:foreach(fun(N) -> net_adm:ping(N) end ,

Message was in fact not raised by net_adm:ping/1 but by net_adm:world/0 .

But what is tricky is that we do not have
" 	localhost"
in our test env.

*in such case no message is raised* .

As it was the lone difference between both env, I add the line in
our /etc/hosts and I saw that raised the messages.

It is the reason why I though it was the only problem .

When removing 'localhost'. in ~/.hosts.erlang everything is OK.

So localhost must be both in /etc/hosts and ~/.hosts.erlang to create
the problem. Strange isn't it ?


More information about the erlang-bugs mailing list