rabbitmq / erlang-rpm

Latest Erlang/OTP releases packaged as a zero dependency RPM, just enough for running RabbitMQ
https://rabbitmq.com/install-rpm.html
Other
545 stars 117 forks source link

gen_tcp:connect returns badarg with valid arguments #72

Closed lukebakken closed 5 years ago

lukebakken commented 5 years ago

Command to reproduce:

erl -noshell -eval ge'n_tcp:connect({192,168,1,5}, 5140, [{active,false}, {ip ,{127,0,0,1}}], 1000).' -s init stop

Output on CentOS 7 with the package installed from here:

[root@localhost ~]# erl -noshell -eval 'io:format("~p~n", [gen_tcp:connect({192,168,1,5}, 5140, [{active,false}, {ip ,{127,0,0,1}}], 1000)]).' -s init stop
{"init terminating in do_boot",badarg}
init terminating in do_boot (badarg)

Crash dump is being written to: erl_crash.dump...done

Output on my Arch Linux workstation, with kerl built versions of 21.2.2 and 21.2.4:

$ erl -noshell -eval 'io:format("~p~n", [gen_tcp:connect({192,168,1,5}, 5140, [{active,false}, {ip ,{127,0,0,1}}], 1000)]).' -s init stop
{error,econnrefused}
lukebakken commented 5 years ago

This appears to have something to do with binding via 127.0.0.1, and isn't a package bug. Whew!