[erlang-questions] using inet_gethost_native even if disabled

Benoit Chesneau <>
Wed Apr 3 14:50:29 CEST 2013


So I tried to use the environment variable and it is still using the
native resolving:

Here is the trace:

I/ErlangThread( 1447): default inetrc path:
/data/data/com.example.app/erlang/bin/erl_inetrc
V/ErlangThread( 1447):
{error_logger,{{2013,4,3},{14,45,27}},"~s~n",["Error in process
<0.17.0> with exit value:
{epipe,[{erts_internal,port_command,[#Port<0.54>,[<<6
bytes>>,\"localhost\",0],[]],[]},{erlang,port_command,2,[]},{inet_gethost_native,run_once,0,[{file,\"inet_gethost_native.erl\"},{line,152}]}]}\n"]}

The first line display what is passed to setenv.

And when I read the erl_inetrc content on the device I have:

# cat /data/data/com.daleharvey.mobilefuton/erlang/bin/erl_inetrc
%% Use erlang's internal resolver. Native DNS on android is annoying
{lookup, [file,dns]}.


not sure what's the problem there...

- benoît


On Wed, Apr 3, 2013 at 2:47 PM, Benoit Chesneau <> wrote:
> On Wed, Apr 3, 2013 at 11:57 AM, Danil Zagoskin <> wrote:
>> Hello.
>>
>> Try to start your VM with custom inetrc. Just set ERL_INETRC environment
>> variable to inet config file path.
>> In config file write:
>>    {lookup, [file, dns]}.
>>
>> This will tell erlang's resolver to use it's own DNS client, not system one.
>> More info at http://www.erlang.org/doc/apps/erts/inet_cfg.html
>>
>
> mmm thanks, I will try to set the env I was using the option `-kernel
> inetrc /path/to/erl_inetrc` for now but it doesn't seem to work .
>
> - benoît



More information about the erlang-questions mailing list