[erlang-patches] jinterface: OtpEpmd.get

Henrik Nord henrik@REDACTED
Thu Sep 20 11:58:20 CEST 2012


Hi

(Raimo wrote)
Could you try: + return lookupNames(InetAddress.getByName(null)); 
instead, as it is documented to return the loopback address. That would 
save us from surprises if "localhost" is strangely configured. The epmd 
will listen to * so locally using the loopback address should always 
work. If we one day change socket type (configurable) in OtpEpmd to 
inet6 I guess the corresponding ::1 address is returned by the above line.

Thank you for your contributions!

On 09/19/2012 11:19 AM, Vlad Dumitrescu wrote:
> Hi,
>
> I found a problem with OtpEpmd if the network is badly configured:
>
> In an enterprise environment, it's not an easy task to get the machine
> configuration corrected.
> On some machines with weird network configurations,
> InetAddress.getLocalHost() hangs. Searching for "localhost" works (at
> least in the cases I met). The difference is that the loopback address
> will be returned, instead of the real IP address, but for the local
> machine this should not be a problem.
>
>
> git fetch git://github.com/vladdu/otp.git jinterface_epmd_localhost
>
> https://github.com/vladdu/otp/compare/jinterface_epmd_localhost
> https://github.com/vladdu/otp/compare/jinterface_epmd_localhost.patch
>
> I don't know how to configure the network to provoke the problem, but
> I just got confirmation from someone that has it that with this fix
> everything works as expected.
> [Note that for this user, "erl -sname foo" and "erl -sname bar" can't
> connect to each other, one has to use "erl -sname foo@REDACTED"]
>
> There are no tests covering OtpEpmd, would this change require any?
>
> best regards,
> Vlad
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches

-- 
/Henrik Nord Erlang/OTP




More information about the erlang-patches mailing list