Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to start with ERL_EPMD_ADDRESS=127.0.0.1 #11

Closed
paulmenzel opened this issue Nov 10, 2020 · 6 comments
Closed

Fails to start with ERL_EPMD_ADDRESS=127.0.0.1 #11

paulmenzel opened this issue Nov 10, 2020 · 6 comments

Comments

@paulmenzel
Copy link

Setting the environment variable for the epmd address to localhost ERL_EPMD_ADDRESS=127.0.0.1 in the systemd service unit

Environment=ETURNAL_ETC_PREFIX=/project/eturnal ERL_EPMD_ADDRESS=127.0.0.1

eturnal fails to start with the error below.

eturnalctl[91982]: Protocol 'inet_tcp': register/listen error: econnrefused
@paulmenzel
Copy link
Author

epmd is not a separate service and should be started by eturnal.

@weiss
Copy link
Member

weiss commented Nov 10, 2020

Sounds like epmd fails to start with an ERL_EPMD_ADDRESS on your system. One possible reason would be that IPv6 is disabled in a way that doesn't allow binding to ::1 (which epmd tries to do if you specify an IPv4 listen address, which is the reason we no longer do that by default).

If this is not the issue: Does journalctl -u eturnal show additional output? Do you get any output when stopping eturnal and then calling ERL_EPMD_ADDRESS=127.0.0.1 epmd -d manually?

@paulmenzel
Copy link
Author

Sounds like epmd fails to start with an ERL_EPMD_ADDRESS on your system. One possible reason would be that IPv6 is disabled in a way that doesn't allow binding to ::1 (which epmd tries to do if you specify an IPv4 listen address, which is the reason we no longer do that by default).

Indeed, IPv6 is disabled in our environment.

$ sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1

@weiss
Copy link
Member

weiss commented Nov 11, 2020

net.ipv6.conf.all.disable_ipv6 = 1

Yes, this is the setup that lets epmd fail: Binding to INADDR6_ANY works, binding to INADDR6_LOOPBACK doesn't. On our IPv4-only servers, we disable the IPv6 stack altogether by adding ipv6.disable_ipv6=1 to the kernel command line. That way, epmd won't attempt to bind to ::1. (See also this posting, for example.)

So there's nothing we can do about this; if anything, the problem could be reported against Erlang/OTP.

@weiss weiss closed this as completed Nov 11, 2020
@paulmenzel
Copy link
Author

So there's nothing we can do about this; if anything, the problem could be reported against Erlang/OTP.

erlang/otp#4820

@weiss
Copy link
Member

weiss commented Mar 11, 2022

Seems this will be fixed in future Erlang/OTP releases.

weiss added a commit that referenced this issue Jul 14, 2022
If an EPMD process is spawned during eturnal startup, let it listen on
localhost only.

This reverts commit 3a65d40, since
issue #11 has been addressed by Erlang/OTP 25.0:

erlang/otp@e8c9e12

Resolves #9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants