epmd icon indicating copy to clipboard operation
epmd copied to clipboard

Option to listen to IPv4 only

Open func0der opened this issue 5 years ago • 1 comments

I am trying to setup epmd to listen to only ONE local IPv4. No binding to 0.0.0.0 or :::.

$ ERL_EPMD_ADDRESS=10.40.95.10 epmd -d
epmd: Tue Oct  6 21:38:18 2020: epmd running - daemon = 0
epmd: Tue Oct  6 21:38:18 2020: failed to bind on ipaddr 0.0.0.0: Cannot assign requested address

It tries to listen to ::1, too, as an strace shows. I think this is either a bug or needs a -4 parameter to only listen to IPv4 addresses.

For context: I am trying to setup rabbitmq. Not 100% sure, if this is the correct epmd.

func0der avatar Oct 06 '20 19:10 func0der

https://github.com/erlang/epmd/blame/c27e1e3d37f9bb7f657782be5809b78a58b98b4d/README.md#L43

Note: $ERL_EPMD_ADDRESS and address is not yet implemented.

I suspect you'd have to change these lines:

https://github.com/erlang/epmd/blob/c27e1e3d37f9bb7f657782be5809b78a58b98b4d/src/epmd.erl#L106-L108

to read it from an env var like these lines:

https://github.com/erlang/epmd/blob/c27e1e3d37f9bb7f657782be5809b78a58b98b4d/src/epmd.erl#L110-L111

nh2 avatar Jul 15 '21 00:07 nh2