added :localhost argument to :erl_empd.names() #179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was using the library with one of my projects, and today I got myself a new dedicated server from the german ionos cloud, and I tried to run an elixir mix release of one of my applications directly on the server. (both build machine and server are Ubuntu 22.04 lts, amd64)
But it did not work, when I was debugging the issue, I noticed that :erl_epmd.names was causing the bug.
The bug is of the nature that it hangs up for ~30 seconds before returning a {:error, :address}, thus causing libcluster to crash the application. I tried installing erlang libraries on the server but it does not fix anything.
However, then I added the :localhost atom as the argument to :erl_epmd.names() function call, it fixed the issue and now everything works as intended. It is very strange because localhost is supposed to be the default value.
I am not able to delve deeper into the issue then this surface-level analysis, as I did not find anything online, and I am not an expert on the low-level erlang stuff.
However, this is a working fix, I tried it in other environments, and it works as expected. I want to stress that I have never had this issue before with different servers, perhaps it is caused by strange server defaults, which are a thing with ionos.
If you have any other questions regarding this issue, feel free to ask me I will help you out in any way I can. For my own deployment, I have made a custom Cluster. Strategy, so it works either way for me, however, I hope with this fix a similar issue might be avoided for someone else.
Cheers